What is the purpose of the 20 XRP cost to start a wallet? Does the money stay in the wallet or is it used to pay for something?

If it's used to pay, who does it go to?

If it stays in the wallet, am I allowed to take it out and drain the wallet later without any consequences?
Unlike a bitcoin receiving address, a funded Ripple wallet is a real thing on the ledger that has properties. This has advantages and disadvantages, but one of the disadvantages is that there's a cost associated with having one. To cover the costs imposed on the network, the XRP Ledger has a "base reserve" that is XRP that is not spendable or transferrable. You can use the reserve to pay transaction fees and, if the reserve drops, you can transfer out XRP to the new reserve level.

Some of the advantages of this scheme include:

The ability to change the key protecting an account without changing the receiving address.

The ability to configure an account for multisign and change the keys, signers, or quorum, again all without changing the receiving address.

Addresses can configure what assets they're willing to accept as payment and payments to them can automatically route through intermediary assets to find the cheapest path.

Accounts can place offers to trade one asset for another on a distributed exchange that follows deterministic rules.

The reserve goes up (currently by 5 XRP) for every additional object an account owns in the ledger (such as a trust line, offer, or escrow). You can reduce your reserve by eliminating these objects, but current rules do not allow the base reserve to ever be transferred or spent -- it covers the cost associated with recording the fact that the account has already performed certain transactions and without this recording, those transactions could potentially be replayed.