It's not generally to protect investors it's to generate cash. Remember that when warrants are exercised the company itself issues the new shares and collects the cash to company funds. If the warrants expire the cash generation opportunity for the company is lost.
Completely agree with your summation. They are generally not to protect or reward investors but there are scenarios where the company extends the warrants despite not needing further funding through warrant exercise. A jr copper company that I am in has perenially extended under-water warrant expiries as an acknowledgment, imo, that the company's progress towards a liquidity event has been painfully too slow, largely as a result of their many past blunders.