While bonuses are taxed very high upfront everything works itself out when you do your taxes. Unfortunately payroll systems are not great at properly calculating taxes to be taken out. Case in point my wife works part time by choice. She may have a pay period(every 2 weeks) where she only worked 16 hours and no federal taxes are taken out and another pay period where she worked 40 hours and gets federal taxes close to appropriate. I think the way the system for pay is fine. It is up to the employee to properly negotiate their salary.
Variable number of hours worked is a qualitatively different issue than a one-time bonus payment.
Most payroll systems do the following:
1) Note the pay for that payroll period.
2) Multiply the pay by the number of pay periods in the year, to get annual pay.
3) Calculate the annual tax for the annualized pay.
4) Divide the annual tax by the number of payroll periods to get the tax to withhold from that paycheck.
That's wrong.
1) Note the pay for that payroll period that is repetitive pay and that which is a one-off payment (i.e., a bonus).
2) Note the pay already received in prior pay periods in that tax year.
3) Note how many pay periods, including the current one, remain in the tax year.
4) Note how much tax has already been withheld this tax year.
5) Compute Annual pay by this formula:
Prior Pay + Current One-Off Pay + (Number of pay periods remaining * Current Repetitive Pay)
6) Calculate Annual Tax from Annual Pay.
7) Subtract Prior Paid Tax from Annual Tax and divide that amount by the number of periods remaining to get how much tax to subtract from the paycheck.
Doing the payroll this way has several advantages for the employee:
1) One time bonuses aren't over-taxed by assuming the employee will make that much money each pay period. This way, they don't have to wait until they get a tax refund to earn the full non-taxable bonus amount.
2) It softens the tax withholding when someone works a whole bunch of hours (especially when they are getting a higher rate).
If someone works a whole lot of extra hours later in the year, it won't have much effect on the tax calculations since the overall pay for the year will be close to correct. If they worked those same hours in the first payroll period of the year, the software would reduce the taxes in the next, regular pay period to even it out early (instead of waiting for a tax refund).