The fee is to be payed by Musk if the deal falls through for a few soecific reasons: either his financing falls through or a few other conditions (for example, USA blocks the deal).
Doesn't seem fair to shareholders to initiate a buyout procedure that doesn't go anywhere - there is a significant cost to the company because of the pending offer. The same can't be said for the party that initiated the offer. So, the party that initiates the offer also has to include the chance of regulatory action blocking the deal in their estimates, and decide if paying $1B in that contingency is worth. Musk certainly did, or else he wouldn't have signed the contract.
For example, in the case of this acquisition, it seems almost impossible for the government to step in - so, the expected value (in the probability theory sense) of the downside is close to 0.
Do a search for "Parent Termination Fee".
TL;DR: There is indeed a $1B termination fee.