Is there a business model that makes those more attractive categories for the issuers?
Every reward program has to have a funding source.
If the card gives you x percent back on all purchases. That means that their business is structured to entice you to pump more transactions through the system. Either their other costs are lower, or the increased business allows them to make more money off of late fees, and interest.
If the card has you earn extra points for buying a type of item or from a type of store (home stores improvement in the Spring), they are trying to make sure you use their card for what can be a significant amount of business during a small window of time. Sometimes they cap it by saying 5% cash back at home improvement stores during the spring but only on the first $1500 of purchases. That limits it to $75 maximum. Adding more business for them, makes more money for them.
Groceries and gas are a good year round purchase categories. Yes there is some variation depending on the season, and the weather, but overall there is not an annual cliff once the season ends. Gas and groceries account for thousands of dollars a year these are not insignificant categories, for many families are recession proof. If they perceive a value from this type of offer they will change their buying behavior.
My local grocery store has a deal with a specific gas station. This means that they made a monetary deal. Because you earn points at the grocery store and spend points at the gas station, the grocery store is paying some compensation to the gas station every time you use points. The gas station must be seeing an increase in business so theoretically they don't get 100% compensation from the grocery store.
In cases where credit cards give airline miles, the credit card company buys the miles from the airline at a discount because they know that a significant number of miles will never be used.
There absolutely is a specific model that makes this so popular with so many credit card companies, and that model is "per transaction fees". Card companies also receive cost-sharing incentives from certain merchants. There is also a psychological reasoning as an additional incentive.
Think Of The Merchants
When you want to accept credit cards as a source of payment as a business, you generally have three kinds of fees to pay: monthly/yearly subscription fees, percentage of transaction fee, and per transaction fee.
The subscription fees can be waived and sometimes are expressed as a "minimum cost", so the business pays a certain amount whether you actually have people use credit cards or not. Many of these fees don't actually make it to the credit card companies, as they just pay the service providers and middle-men processing companies.
The percentage of transaction fee means that the business accepting payment via credit card must pay a percentage usually ranging from 1-3% of the total transactions they accept. So if they get paid $10,000 a month by customers in the form of credit cards, the business pays out $100-300 a month to the credit card processor - a good portion of which will make it back to the credit card issuing company, and is a major source of income for them.
The per transaction fee means that every time a transaction is run involving a card, a set fee is incurred by the business (which is commonly anywhere from $0.05 to $0.30 per transaction). If that $10,000 a month business mentioned previously had 10 customers paying $1,000 each at $0.10 a transaction, that's only $1 in fees to the credit card processors/companies. But if instead that business was a grocery store with an average transaction of $40, that's $25 in fees.
Think Of The Credit Card Companies
This system means that if you are a credit card company and want to encourage people to make a specific kind of purchase, you should encourage purchases that people make many times for relatively small amounts of money. In a perfect world you'd want them to buy $1 bottles of water 5 times a day with their credit card. If the card company had 50,000 card holders doing this, at the end of 1 year the company would have $91,250,000 spread across 91,250,000 transactions. The card company might reasonably make $0.05 per transaction and %1 of the purchase total.
The Get Rewarded For Drinking More campaign might earn the card company $912,500 in percentage fees and over $4.5 million in transaction fees. Yet the company would only have to pay 3% in rewards from the percentage fees, or $2.7 million, back to customers.
If the card company had encouraged using your credit card for large once-yearly purchases, they would actually pay out more money in rewards than they collect in card-use fees. Yet by encouraging people to make small transactions very often the card company earns a nice net-income even if absolutely every customer pays their balance in full, on time, and pays no annual/monthly fees for their card - which obviously does not happen in the real world. No wonder companies try so hard to encourage you to use your card all the time!
The Power of Habit
For card companies to make real money they need you to use your credit card. As discussed above, the more often you use the card the better (for them), and there can be a built-in preference for small repeated transactions. But no matter what the size of transaction, they can't make the big bucks if you don't use the card at all! Selling your personal information isn't as profitable if they don't have in-depth info on you to sell, either. So how do they get you to make that plastic sing?
Gas and groceries are a habit. Most people buy one or the other at least once a weak, and a very large number of us make such purchases multiple times a week. Some people even make such purchases multiple times a day! So how do people pay for such transactions? The goal of the card companies is to have you use their product to pay as much as possible. If you pay for something regularly you'll keep that card in your wallet with you, rather than it getting lost in a drawer at home.
So the card companies want you to use your card as a matter of habit, too. If you use a card to buy for gas and groceries, why wouldn't you use it for other things too? Lunch, dinner, buying online? If the card company pays out more and makes less for large, less-regular purchases, then the ideal for them is to have you use the card for small regular purchase and yet still have you use the card for larger infrequent purchases even if you get reduced/no rewards.
What better way to achieve all these goals than to offer special rewards on gas and groceries? And because it's not a one-time purchase, you aren't so likely to game the system; no getting that special 5% cash-back card, booking your once-per-decade dream vacation, then paying it off and cancelling it soon after - which would actually make the card company lose money on the deal.
TLDR; Bottom line...
In the end, credit card companies as a whole have a business model that almost universally prefers customers who use their products regularly and preferably for small amounts a maximum number of times. They want to reduce their expenses (like rewards paid out) while maximizing their revenue. They haven't figured out a better way to do all of this so well as to encourage people to use their cards for gas and groceries - everything else seems like a losing proposition in comparison.
The only time this preference differs is when they can avoid paying some or all of the cost of rewards, such as when the merchants themselves honor the rewards in exchange for reduced or zero payment from the card companies. So if you use an airline card that seems to give you 10% back in airline rewards? Well, that's probably a great deal for the card company if the airline provides that reward at their own expense to try to boost business. The card company keeps the transaction-related fees and pays out almost nothing in rewards - the perfect offer (for them)!
And this assumes no shenanigans like black-out periods, "not valid with any other offers" rewards like on cars where only a fool pays full MSRP (and sometimes the rewards are tagged in this sort of way, like not valid on sale/clearance items, etc), expiring rewards, the fact that they know not everyone uses their rewards, annual fees that are greater than the rewards you'll actually be obtaining after accounting for all the other issues, etc. And credit card industries are known for their shenanigans!