What is the difference between sentences below?
The government ceased providing free health care.
The government ceased to provide free health care.
No. 1 is correct.
No. 2 is correct, but sounds awkward compared to #1. In this case, the infinitive following the verb "ceased" is acting as its direct object. But as you have pointed out, using a gerund would be a simpler construction. I suspect some people favor this construction because it sounds more "official" or like legal writing.
A better use of an infinitive following a verb should describe the purpose or intent of that action: The government has ceased the health care program to save money. (The infinitive "to save" describes the intent of "ceased."
Other uses of the infinitive:
After an adjective, to specify what the adjective describes: It is costly to provide free health care.
After a noun, to indicate purpose: The government passed a law to provide free healthcare.
As a subject: To provide free health care is the purpose of the law.