Why was Cyrus "anointed"? How/why did God use Cyrus of Persia to conquer the region?

Isaiah 45:1-2

“This is what the Lord says to his anointed,
to Cyrus, whose right hand I take hold of
to subdue nations before him
and to strip kings of their armor,
to open doors before him
so that gates will not be shut:
2 I will go before you
and will level the mountains[a];
I will break down gates of bronze
and cut through bars of iron.