Your example looks to me like it has been created by some sort of WYSIWYG-tool - to which Adobe GoLive also belongs. I have to cope with a site which has been done entirely with GoLive, and the code behind it is simply abominable. If you find a tool to tidy the code, I'd be grateful to know more about it.
I still find html-editors such as HomeSite the most useful. It even offers a tidy-tool which is actually not too bad. When you write your own code you can keep it simple, to the point and correct - assuming you know your html. I do recognise, though, that you can't design a big project from scratch by writing code - you'd probably get to be a hundred and still not finished.
But when code is not just way too complex, but just plainly wrong, re-writing it is probably the best idea - right after shooting the author, as Vynce suggests.
-- cs