In my opinion the ideal commute distance varies depending on time availability, weather, energy level, etc.
I've always varied my distance by choosing between the most direct route or going out of my way to lengthen the commute.
Now I live 30 miles from work, so I get my variety based on where I choose to pull the car over and unload the bike. So far I've done mountain bike routes of 5, 9 and 12 miles. And I've done road bike routes of 9, 14 and 16 miles.
I expect to go longer than 16 miles as my fitness improves and while the weather is favorable, and then to shorten the distance when the temperature drops and the ice and snow arrive.
Variety is the spice of commuting life -- I think Shakespeare said that.