There is some truth to this actually. Companies often charge both sides of payroll tax on bonuses, which adds another ~6%. IIRC some states have a bonus tax as well.
That said, higher base salary is usually better than lower salary + bonus because your annual raises are larger on a higher base. Variable comp also just kind of sucks period - you get a big windfall at some point in the year, but you can't plan for it because you don't know how big it will be.