Personal preference?
I guess, but spy can mostly do more work if done right. He can sap giant robots which can slow them down, or even sap large groups of smaller robots (medics).
He can get TONS of hp down from giants in sheer seconds with armour entry, as well as dispersing with normal robots to.
Sniper can do damage and make mini-crits sure, but not as fast as spy can deal damage. It's riskier but it works better. Risk v.s Reward I guess.
Even so, both aren't the best classes for MvM and ESPECIALLY not expert. I've completed an expert tour and in none of the three matches that I won we had a sniper or spy.