Allowing flow of power from rooftop solar into the grid isn't free.
The cheapest power to generate is the base load - long running gas, nuclear, coal, whatever. These are plants that take days or weeks to spin up and down and produce the most cost effective, efficient power. Since supply on the grid must exactly meet, always, these efficient plants can only be used to provide the base load - the amount of load below which the grid never drops.
Any power required beyond the base load comes from generation designed to be used periodically. It's not as efficient. There are stages to this too - you can have generators which take hours to come up which are more efficient than those which take minutes.
Residential power generation can cause the base load to drop, and require more peak load generation, increasing the production cost of power.
The power which customers generate must also go through transformers, rectifiers, and all that good stuff to be usable by others, and that equipment isn't free either.
Whether the company buys in wholesale quantities doesn't really matter, since the costs incurred from supporting residential net-metering aren't zero. It makes sense that they pay less for power they buy than what the sell, otherwise, that cost is shifted to someone else.