I think it's a little more complicated then that. A variable might not be linear in general but may be approximately linear within a certain range of values. You might fit the model on values only within that linear range and thus get a good fit. The model may be very useful inside the range of fitted values but garbage at extrapolation. As long as you understand the limitations it can still be a useful model.
While you’re right, the original post is meant to be pedagogical. Someone who doesn’t understand the fundamentals of model selection might learn the wrong lesson(s).
You kinda have to expect a student to use the examples you give.