It is the power of faith. Read Hebrews 11:24–26: By faith Moses, when he was grown up, refused to be called the son of Pharaoh’s daughter, choosing rather to be mistreated with the people of God than to enjoy the fleeting pleasures of sin. He considered the reproach of Christ greater wealth than the treasures of Egypt, for he was looking to the reward.
Moses had the choice: to live as a prince in wealth and luxury, or to join his brothers who are oppressed. He chose to join the fate of the slaves rather than to stay aside.
12 Il regarda de côté et d'autre, et, voyant qu'il n'y avait personne, il tua l'Egyptien, et le cacha dans le sable.