Well first, it has nothing to do with minimizing staffing. Having Fastpass at an attraction adds at least one position and usually more, not to mention the entire team behind it and adjusting it behind the scenes.
Basically, Fastpass, and Fastpass+, are free because they are not a "skip the line" pass. They are a form of virtual queuing. By virtual queuing this enables guests to, in theory, spend less time in lines and more time in parks and restaurants, thereby spending more money. Fastpass+ took this a step further by enabling to control the supply and demand of the Fastpasses to a much deeper level, to the point where they can adjust how they are distributed, when more passes are dropped, etc. to move crowds where they want them.
Another thing Fastpass, and even moreso with Fastpass+ does, is artificially inflate the standby lines. Some posters on here will argue tooth and nail that this isn't true, but anyone who has ever worked directly with the Fastpass system or on a popular attraction that uses Fastpass will confirm that it is true. Disney likes to tout that "people who use Fastpass ride more than those who don't." Well, this is absolutely true, however, what it really means is you HAVE to use Fastpass to ride the same number of attractions as you would if the system did not exist at all. It forces you to do more work to get the same experience, though of course with some benefits such as waiting in shorter queues. Fastpass+ has made this concept even more frustrating because you typically have to plan your Fastpasses in advance or you will be left with slim pickings. This brings me to my next point - with the old legacy Fastpass system, the "playing field" was the same for everyone. Want good Fastpasses? Get there early. However, Disney resort guests have a massive advantage by being able to reserve 60 days out. Others who purchase their tickets in advance and plan ahead can reserve Fastpasses 30 days out. Anyone who purchases their tickets day of will probably be screwed and at a massive disadvantage and will likely experience less than everyone else.
Finally, I will leave you with the numbers. Disney distributes enough Fastpasses to account for 80% of any ride's hourly capacity. On any popular attraction, 80% of anyone riding entered using a Fastpass. The "illusion" they want you to believe is that you are "skipping the longer line". In reality, you are in the vast majority of riders when you use a Fastpass.