Network Solutions and (I think) Register.com used to do this (probably still do), and claimed it was a "service" to prevent your domain from being snatched up by someone else before you got a chance to buy it. Of course, the fact that it meant you'd have to buy it from them was obviously just an unfortunate coincidence that they would avoid if they possibly could. I'm sure.
If I recall correctly, what they are actually doing is taking advantage of the grace period that is built in to domain name registration. They buy the domain, and will resell it to you if you want it within those 5 days, but if you don't want it, they will release it (at which point their own fees are refunded). So all you have to do if this happens to you is wait 5 days, and then you can buy it from whoever you like.
But yeah, it's a shitty practice, and you definitely should do your business through a registrar that doesn't do it.
There are 104,419,043 .com domains out there [1] and GoDaddy claims to have registered over 53 million domains (non-.com extensions included) - what are the chances of a new domain being registered with GoDaddy? If GoDaddy were to do domain tasting they would go bankrupt pretty soon.
That actually doesn't fix the problem as far as registrars are concerned, because the fees only apply if you get refunds above a threshold of 10% of the domains registered. That puts registrars in a uniquely advantageous position for tasting because they register so many domains.
Here's a strategy a registrar could use. For a given 10 minute period, you take the number of domains actually bought by customers, and call that X. Then you multiply that by 10% and call that Y. Now, you take all of the domain searches for unregistered domains that have come through you within that 10 minute period, and run them through a machine learning algorithm that ranks them by the likelihood that they will be purchased. You take the top Y of that list, and taste only those. Now you are guaranteed not to exceed the threshold where you start getting charged for deleted domains.
I am not sure how this strategy would work if the end registrant gets a refund. It may be that that ends up adding to the registrars own tally of refunds, but it would be trivial to tweak the above strategy to decrease Y to adjust for customer refunds, with a controllable amount of uncertainty which can be optimized to maximize the profitability of the strategy over the long run.
Domain tasting used to be easy money for spammers. Simply "taste" a huge number of domains, such as misspellings of popular sites, and put typically ad-filled domain parked pages on them. Figure out which ones make money and which don't, register the ones that are profitable, let the others lapse, and move on.
If I recall correctly, what they are actually doing is taking advantage of the grace period that is built in to domain name registration. They buy the domain, and will resell it to you if you want it within those 5 days, but if you don't want it, they will release it (at which point their own fees are refunded). So all you have to do if this happens to you is wait 5 days, and then you can buy it from whoever you like.
But yeah, it's a shitty practice, and you definitely should do your business through a registrar that doesn't do it.