Alphabet shifted the timing of stock compensation in 2017Q1, and this definitely screwed over some Noogler cohorts in 2017 (who may have expected a refresh in January 2017 or July 2017, but actually didn't get one until January 2018).
Same at Facebook and Apple. At least, they're entirely formulaic.
That was not the case when I was at Apple- the formula recommended a bonus but IIRC it was officially at managerial discretion. Different orgs were run with different budgets, and while not this extreme I had seen similar things happen while I was there, including getting lower bonuses myself and one coworker quitting after their bonus was significantly lower than promised (or maybe they were denied it entirely, I don't remember exactly). We were told the same thing about organizational budgeting.
AFAICT (as a non-manager), it was entirely manager’s discretion, within a budget, at Apple.