I have stumbled upon instances where "は + verb" is used in situations where I thought "を + verb" should be used. For example, recently I've seen
その覚悟はしてました
I was prepared for that楽な道は選ぶな
don't choose an easy road
Is there a difference? And if there is, what's the "rule" when to use は instead of を?