In the EU the directives define a max range. Eg. 10% of global revenue or 20 million EUR whichever is higher.
Then the court figures out to what extend the company broke the law.
This system is needed to make sure that there are not some member states that are more forgiving and provides a competitive edge for companies to move there.