I see four key differences.
Usually a bonus is paid as a lump sum at the end of the year -- maybe a calendar year, maybe the anniversary of you starting with the company. I'll assume this is the case for purposes of discussion. So let's compare job A, which will pay, say 1000 foobars a month, with job B, which pays 900 foobars a month and a 1200 foobar bonus at the end of the year.
In both cases, the total pay is the same: 12,000 foobars for the year.
One: You don't get the bonus until the end of the year, so you have to wait for your money. It's almost always better to get money sooner. Then you can buy that new toy or whatever and enjoy it now rather than waiting. If you have no
immediate use for it, you can invest it and make some additional income.
Two: If you quit in the middle of the year, you do not get the bonus. No job lasts forever. If a significant percentage of your pay comes as an end-of-year bonus every year, then the year you quit or are laid off, you get zero bonus. So in job A if you leave after 6 months, you get 6,000 foobars. In job B you get only 5,400.
Three: There is often uncertainty about a bonus. It may depend on you meeting certain goals set by the employer, or the company making a certain profit level. Often bonuses are totally at the whim of the boss. I once had a job where I was promised a substantial percentage of my pay as an end-of-year bonus, and when the time came, the boss told me the company wasn't doing well and he didn't have the money. You may be promised a bonus your first year, but the next year they give a smaller or no bonus. Etc.
Four: Pay raises are often calculated as a percentage of base pay. Like if the company says that this year everyone will get a 5% raise, in job A that means an extra 50 foobars a month. In job B it probably means an extra 45 foobars a month. The bonus may or may not be increased. Yes, my example is over-simplified because most companies don't give a blanket x% raise to everyone. But most companies do have a range: raises this year will be 1 to 3% or whatever. Even if each employee's pay is considered on an individual basis with no fixed percentages, the employer tends to think in terms of what percentage raise is appropriate, almost always calculated just on base pay.