Ahh, but if I die of starvation, I can't very well make people happy, now can I? Assuming everyone followed the thought's direction, the way to best make people happy is for me to live a healthy and long life, probably. (Of course, it'd be up to each individual to determine how to best make other people happy. Maybe I would decide that my contribution to climate change was causing unhappiness, so I would end my life.)
When you only live to make others happy, you disregard your needs by putting others first. That ends affecting your well being. Your whole personality turns into service and you are easily exploited and abused.
"the purpose of your life is to make others happy"
No one said anything about only. My purpose is to build new things. I eat, sleep, and interact with others in an attempt to put myself in my best condition - this is no different.
Ignoring self-maintenance is against any purpose but sacrifice