Sometimes it's actually completely all above-board. You buy the tool- but it's well-worn and has no packaging, because a hundred other people have bought & returned the same tool before you.
Autozone is one example, offering this service for things like bearing presses and radiator pressurizers and so forth. They don't make any money on the tool in this case; the play is, if you have access to <expensive special tool> you'll do the work yourself and buy parts & consumables from them.
BUT, you're totally right about the time & gas, and there's also the issue where you always discover you need tool X right after removing the engine.
Autozone rents tools. You pay for it in case you don't return or break it though. Those aren't the same tools they have on the shelf. They're more specialized stuff needed less frequently and they have specific ones that get loaned out over and over.
There's places where you can buy them and return them a day later for a full refund.