You should look into how investment bankers bonus work.
If bonus was actual profit sharing, I would agree that it would be a different thing more akin to a bet, but the bonus is contingent mostly on your personal “performance” with some bail options if company hits the skids, but salary is a bet in that case as well, as you are an at will employee.
They're often not very bet-like in modern practice. One common setup is to have a "bonus target" of let's say 20% of your salary which is usually paid at par; perhaps you might get 25% if you get really great results or 15% if you have some big struggles.