Typically take them in the shower with me after I ride and give a good rinse out.
Go through the washing machine whenever I have to do a load or whenever they stink.
I do have a pair of friends who road across the US and never washed their shorts. I smelled them before I saw them.