There are other options. My commute to one end is 40 minutes, of which 20 minutes are walking (obviously not a waste). The other 20 minutes on a train is reading articles.
Depending on your perspective, walking can be a waste. It's better than driving because it provides fitness benefits, but it's much worse than actual aerobic (or anaerobic) training.
For instance, you would be better off driving for 5 minutes after spending 15 minutes doing interval training or some other kind of intensive exercise.