Hello! Public goods are goods that are 1) non-rivalrous and 2) non-excludable. Non-rivalrous means that continuous consumption of these goods will not diminish its quantity for other consumers while non-excludable means that consumers (regardless of whether or not they paid) cannot be excluded for consuming the good. Software is an example of a public good.
Now, because of the non-exclusion nature of these goods, private firms will have the free-rider problem (those consumers who use the good without paying). Because of the non-rivalrous nature they are also bound to have a huge demand and therefore they will have a tendency to underproduce hence these goods will be unprofitable.
Lastly, since not all is bound to pay for these public goods, the price system cannot assign the cost to all consumers.
This leaves us with choice D as the only reason why private firms do not produce public goods.
ANSWER: D. the government refuses to grant subsidies to firms who provide public goods