It makes perfect sense to me, because Cuba could otherwise become a destination for travelers with medical conditions who lacked the means to pay for their treatments.
This is a minor requirement compared to the lack of freedoms enjoyed by regular Cubans.