Nobody is required to leave anything.
In some cities I think the gratuity is mandatory, which means it is no longer a gratuity or a tip but part of the sales price or a tax.