The company does, more or less. Each exchange has different rules, dues, groups of well known companies at that exchange, and so on that create various pluses and minuses for a given company. The company's board makes the strategic decision for which exchange they want to spend the time and expense to participate within. I'd think a major factor in the decision is an assessment of their competitive standing within the existing companies in their industry at that exchange already. Will they look competitive when compared against them? Will they look better at this other exchange that has lower expenses / looser rules / weaker competitors?
As an addendum to Blake's comment, the company has final say but it may go with the advice of a financial advisor handling the IPO, as seems to be the case with Facebook and Goldman Sachs: billionaires.forbes.com/article/06Ch8italB8tK?q=Mark+Zuckerberg