It's called a severance package. The company isn't giving you money to quit - you're working at-will and they can terminate your employment at any time for any reason. The amount is usually equivalent to a few months worth of paychecks.
What they pay you for is you signing away your ability to sue for wrongful termination. Because they can't really fire you for any reason.