Typically when they look at your medical history you are scored. For instance you have you have a score under 350 to pass the health questionaire... you have migraines, diabetes and pcos which gives you a score of 200 so you pass and get health insurance. But if you have a heart problem to that mix your score is now 375... you fail and are not offered health insurance. So having a surgery, and a few other conditions you can still pass and be offered health insurance.
The reason insurance companies do not offer everyone that can pay the premium health insurance is because of how individuals are grouped together. When you're on your employers plan the money that is paid by the employer and yourself if put towards everyones care at that company. The same goes with the individuals... all individuals are grouped together. So the premiums that all the individuals pay go into one group fund for individual members. You might have 75 percent that are healthy and never uses their insurance but the premiums they pay help to cover the other 25 percent of people that use their insurance all the time. Plus the insurance companies have to have so much in reserves for catastrophic events... like a natural disaster. If the percentages were reversed and 75 percent of people used their health insurance all the time and 25 percent never used it... you would have higher premiums then there already are and there would be no reserves. So to be cautious you have to meet certain standards to be on private health insurance. However, in most states if you are turned down for private health insurance you can almost be guarenteed to receive assistance from the city or state to get health insurance.
Here is the information for Washington State. You have to have a score of 325 or less, and the points are decreased depending on how long you've had the condition.
Here is the health questionaire....
https://www.wship.org/Docs/SHQ%20Rep...2007-28-08.pdf
Here is the score sheet for the questionaire....
https://www.wship.org/Docs/SHQ%20Sco...%2021%2008.pdf
I hope this clarifies some of your questions.