I believe that if you have an "ends justify means" mentality, this is an inherently immoral way of looking at the world. There are many cliches that match this feeling. "The Road to Hell is Paved with Good Intentions," "Absolute Power Corrupts Absolutely," are two examples. We all are susceptible to hubris and when we trust our judgment rather than objective morals the consequences can be immense.
That being said, I'm thinking of the difference between an "ends justifying means" mindset and the metagame. Could you say that you're playing a metagame when you're actually using "ends justify means?"
Example of a metagame: Level 1 is doing your job well. Level 2 would optimizing to get promoted. So you could do a worse job (bad Level 1) and focus on other things to get promoted. So from a Level 1 frame, it would look like the ends of getting promoted justify the means of doing less quality work.
Metagames are by definition having a different goal than what's apparent. If the goal was the same, then it would be the same level.
Maybe the point of not having an "ends justify means" is that it collapses metagames. It's like a singularity.
Either "never use ends justify means" is wrong or you should avoid metagames. But can you avoid metagames? Aren't they omnipresent and if you don't try to go to higher levels you'll be shortchanging yourself? Maybe this is a constraint and an opposing force?
"Ends justifying means" isn't a guiding principle, it just should be used to override a guiding principle. You can do something because you want the result. Eating is obviously to satisfy hunger.