Pre-existing conditions are medical conditions (problems) that exist at the time you apply for medical insurance.
Insurance companies know that within a given population of insureds a certain number of insureds will require medical treatment which the insurance company will be required to pay for. That‘s fine. Insurance companies are comfortable with this and often take pride in quickly settling deserving claims.
What health insurers really dislike, and are really fearful of, though, are claims for treatment by insureds that purchased the insurance to cover an existing medical problem they were aware of at the time of application. If they didn't list this medical problem on the application and then tried to get the insurer to cover treatment for it, they are committing fraud against the insurance company and are helping to add to the cost of insurance for their fellow insureds.
Surgery, while going through the healing process, can be considered a pre-existing condition. The healing process can normally be up to five years. This can also be true for fully removed cancer. But this may not be true for heart surgery; no matter how successful the surgery is, heart surgery can weaken the heart a bit.
A hernia operation 30 years ago was recently declared to be a pre-existing condition by a client's treating physician; apparently, the original surgery never fully healed properly. The insurer, therefore, declined to pay for the new surgery.
Conditions like Diabetes and Hypertension, that can be controlled, but not cured, are always considered "pre-existing conditions" no matter how well they are controlled.