There are two separate matters that are semi-orthogonal.
Buying the tickets: a money commitment.
Separate from
Actually attending the game: a time commitment.
Look at any game held in SF Giants ballpark. You see a lot of empty seats speckled in the crowd. These are seats that were sold and not attended. Happens all the time, especially in technology. What is happening the is exactly your office dynamic: someone bought seats so they'd have the option to attend with coworkers, and then they did not.
Again, these things are separate. So when you told your boss you weren't sure if you were attending or not, that had no bearing whatsoever on whether you were buying tickets. There is nothing wrong or unusual about buying tickets for an event you're not sure you'll attend. It is simply an opportunity cost.
Note that you did not tell the boss that you would not be buying the ticket. You told them you would not attend. Different things. You may want to think they are the same because you want to be thrifty and not pay for tickets you don't use, but that is not your boss's job.
Your slick trick
Had this gone the other way, and you decided you wanted to go, you would have absolutely expected your boss to have fronted the cost of a ticket just for you. If the boss had said "well, you weren't sure, so I didn't buy you one", you would've objected vigorously. You would argue that Having a ticket reserved for YOU is the whole point of a non-refundable deposit -- And you'd be right.
You wanted to have the right to say that. But you also wanted the right to walk away from the whole deal, and have that work in your favor also - despite the fact that these two things are in conflict.
That's your scam - trying to work the deal both ways, so both break in your favor.
Here's another way to think about it: opportunity costs. You wanted to defer the decision past the decision point. For a normal person, that costs the price of a baseball ticket, like it did for all those people not in the empty seats at Giants park. But you manipulated the circumstances to evade the opportunity cost. Or to be more precise, you want to make your boss eat the opportunity cost.
In other words, you are stealing the opportunity cost.
This is probably too complex for the boss to successfully go to HR and report you for stealing. But certainly, it is the last time anyone will trust you - for event tickets and probably more.
Next time there's an event like that, expect them to ask a $10 deposit from everyone else, and full-boat-upfront from you. Or worse, full-boat-upfront from everyone, and you're the reason why.
Office politics tip: don't be "that guy".