The idea behind the principle “the end justifies the means” is basically “a good outcome excuses any wrongs committed to attain it.”
A specific example of this principle we commonly hear is “at the end of the day, I’m doing this (i.e sin) so me and my family could live in Saudi”
Ash-Shaykh Muqbil rahimahullah mentions in the following audio that this principle isn’t from Islam. Rather, it is a principle made by the communists.
Ash-Shaykh Albany rahimahullah mentions in the following audio that in Islam, the end doesn’t justify the means (which is) contrary to the principle made by the kuffar.
AbdulFattaah Bin Uthman