There is a government philosophy called utilitarianism. It’s based on the premise that a policy is good if and only if it increases overall happiness in a society thus, ends justify the means.
It’s totally valid to be an utilitarian. Nonetheless, you have to accept two premises.
1. There is no individual rights. 2. Measuring happiness is a trivialization of human experience (ex. How many people would need to be given an iPhone in order to justify the torturing an assassination of a child?).
Try reading Justice by Michael Sandel if you want to learn more.