When I'm painting interior walls I go over tham quickly with a damp sponge to remove dust, cob webs, etc. If there are areas that need to be filled, such as nail holes from hanging pictures I fill with a small amount of joint compound, let dry and feather it off with a damp sponge. No sanding and no dust.
Then prime if necessary and top coat. No sanding needed unless it's newly hung drywall. Even then it's up to the tapers to leave a paint-ready finish.
I'm not really talking about major corrective sanding, but more like a 10-minute "prep" sanding, similar to what JSheridan described. It's mostly to prepare for better adhesion and to smooth out the old paint jobs. I very rarely run my hand along a wall and find it to be smooth and if I don't fix it, it looks like I left it. Talking about things such as old drips, sags, roller fuzz/hairs, clumped/coagulated paint specks, and even food spills. Also, bathrooms are notorious for things like hairspray, etc., so a sanding can't do anything but help there either.
Prep doesn't end until the final coat is on. As the job progresses it becomes more of a fine tuning. You know, there are times when I'm sanding between coats that I find some small drips on the wall from cutting in either the ceiling or the wall (I don't do my sanding until after the wall cut at the ceiling, just prior to rolling). In addition to fine sanding the walls, sanding also trains my attention to the walls when I might see something that escaped my attention previously, like a small nailpop or ding I missed that will require a touch-up with lightweight vinyl spackling.