Why does Apple want my password for free apps?

I’ve heard people complaining about how you are required to re-enter your Apple ID password even when purchasing a free app.

Here’s my guess: If you don’t have to enter your password on a free app, your smart human brain will have to think twice when you are about to make a purchase. If it thinks about this too much, it may decide to hold off, or look for a free alternative. Are there any other thoughts on why this is the way it has to be?