It's very definitely not okay with killing for fun, profit, or convenience. This has nothing to do with morality. Morality is a subjective social construct that is related to, but not the same as, the cosmic forces of alignment.
In the former case you're talking about willing conversion into undeath, the necropolitan template stands out, which would be, depending on the form, morally neutral if all of the various methods weren't explicitly called out as evil. In the latter you're talking about evil characters anyway. Converting to undeath allows them to further their evil in the world. It's the exact opposite of the good done by killing them.For some people this would not present much of a problem. For people with all important long term goals it could be viewed as a necessary sacrifice. For people who either don't care or positively enjoy the suffering the inflict on others this would be no problem at all.
It's very important to remember that morality is always subjective even when alignment isn't, while alignment is objective unless your DM says otherwise.