No, it doesn’t. I’ve often heard the phrase, “The end justifies the means”, but how you do something (the means) is as important as what you want to achieve (the end).
For example, if I want to lose weight so I’ll be in better health (a good end), but drink only water and eat only grapefruit to do it (an unhealthy means), the end, no matter how good it is, doesn’t justify the means.
Say I write a book with a good message. I want this message (the end) to get out to a large number of people, so I use an unethical way (the means) of getting on the best-seller list. I gain an unfair advantage over other authors, who may have just as good a message to proclaim, and I damage my character in the process. The end, no matter how many people I reach, does not justify the means.
If I decide to go on social media and gain an astronomical amount of followers quickly to gain the attention of book publishers, I can go to websites and “buy” those followers. I may attract publishers’ attention, but the “means” are unethical. The end doesn’t justify the means.
I wonder how many innocent people over the centuries died because someone or some group believed, “The end justifies the means”.