The Midrash relates a story regarding Zeresh telling Haman to build a gallows to hang Mordechai. At that time, Hashem called out to the trees and asked, "Which of you wants to be the one to be zocheh to supply the wood to hang Haman ha'Rasha upon?"
The Midrash goes on to say how each and every tree came forth with a very good reason why it should be selected as the supplier of the wood. The Grape vine, because Jews are compared to the grape, similarly the olive and pomegranate. The Etrog because a mitzva is dobe with it. the fig because bikkurim are brought from it, the cedar and fir because the Bet Hamikdash and mishkan were built from it, etc., etc. every type of tree came forth with a good reason.
The Kot (thorn bush) then came forth and said, there is nothing great and righteous about me. No reason to select me over anyone else. However, I am a Kotz. A thorn that causes pain. It is appropriate that this thorn (Haman) who causes pain and disturbance to the jews should be hung upon a kotz.".
Hashem accepted that argument and selected the kotz.
(this story is eerily similar to the storty of the selection of Har Sinai as the mount upon which the Torah was given - possibly similar lesons can be learned).
I think the idea is that nto always does one need to be the most righteous to do something, or the most worthy. There are some things which are appropriate and fitting to be done in certain manners. The Kotz hangs the Kotz, even if there are better and more worthy trees. The Jews are matim for eretz Yisrael (the midrash and gemara bring many times), as are other nations for their lands. We should nto always look for the most worthy to do things, rather for what is appropriate.