Romans writes:
For the Scripture says to Pharaoh: "I raised you up for this very purpose, that I might display my power in you and that my name might be proclaimed in all the earth.
Pharoh was a git who did some not nice stuff. Judas was utilised for Gods plan too. Being used by God for Gods purpose doesn't necessarily mean the results will be to our liking. This is not to say of course that the persons actions aren't their own. God just uses the actions to weave his tapestry.
From our perpsective underneath the tapestry may appear to have all kinds of loose strands and ugly patterns. But when you turn it over? An object of beauty
Or so the story goes...