Sometimes the deity which is chosen for you at random is one you have a special connection with (according to Tibetan beliefs, at least).
This is a myth. I have been in Tibetan Buddhism for many, many years. Not once has any teacher every picked out a yidam for me to practice. Yes, it does happen sometimes, but it is not common.
I guess I should have provided more context. The lama only used the term "special connection" and I'm not sure how exactly to interpret that. He said nothing specifically about it being my yidam. Perhaps it was just a special Tibetan way of giving a nice parting gift and nothing more...