Actually, companies are kinda sorta doing that these days. Not mandating, per-se, but offering large discounts on employee premiums for doing wellness stuff. Makes sense for the companies doing it, and their employees, and the insurance companies.
But eating right and getting regular checkups is an individual thing - if we fail to do those healthy things and, say, become hypertensive or diabetic, we're not putting others at risk of exposure to those things, right?
Whereas, in the case of Covid-19, a mandate is appropriate in many circumstances because it's not just us choosing to take care of ourselves (or not), it's also about taking care of our coworkers, or patients, or students, etc. whom we put at greater risk of a deadly infection by going unvaccinated.
And in a more general sense, it's about trying to lower the potential for new and more deadly variants which benefits us all.
And, as always with the mandates, people are free to not get vaccinated. They just aren't free to decide to increase the risk of infection for others.