Combination of what's available in my area that fits me fits me (#1 on the list) combined with what gets me excited, and what I can afford. I have so far not spent over $300 on anything, so that limits my choices quite a bit.
There are all kinds of bikes I would "like to own someday", but if there are none in my area for sale that I can afford, it's simply not gonna happen.
I think being in the right place at the right time is also a big factor, and something you really can't predict, so you always have to be ready with the cash in hand when you see a really good deal.