If you are very posh, you have staff; so do your friends. Therefore, you do not feel the state of the house reflects upon you personally.
(Note: if you are male, this may also feel true.)
If you are rather less posh, but well-to-do, you may have a regular cleaner; so may your friends. You may also feel the state of your house doesn't really reflect on you - but, depending upon your neuroses, you might clean.
If it is very obvious there is no way you can afford a cleaner, then, sorry, the buck stops with you. OMG, there is dust on the shelf/the carpet needs a vacuum/the sink is filthy - well, it must be your low standards, mustn't it?!
I think people clean before guests in exact proportion to the amount of personal responsibility they feel about the state of the house. If everyone knows this is a job you outsource - to the staff, to the cleaner, to your wife - then you don't feel awkward about mess/filth, because it's not your problem.