Idk about in tech, but often these types of bonuses are (1) highly targeted and (2) come with some sort of agreement to stay.
E.g., there's a 5 person team responsible for a critical component. 4 of them leave in the space of 6 months. So management says to the last one "we'll give you $200k at the end of 12 months." That person then leaves in exactly 12 months and a day - which is fine, because they trained the new team on the critical component.