Your sort of right but wrong. Profit is not the problem with expensive health care. The problem is government involvement and patents.
You can track the skyrocketing medical costs back to the mid 1960s with the creation of Medicare. Before that, medical bills were largely affordable and hospitals would carry a financing balance. With Medicare, the government started saying it cost to much to pay for the seniors and soon started averaging costs of medical procedures in 5 or so geographical regions. They then said this is all Medicare will pay and you have to accept it else you cannot accept any insurance. This also marked the widespread acceptance of HMOs as Medicare used them.
The problem with this setup is that it doesn't take into consideration the difference between small town community hospitals and state of the art treatment centers. The averaging was low for a lot of big city hospitals with higher costs and high for smaller ones with lower costs. Congress soon realized that Medicare was still to expensive and started paying only a percentage of the average. Once the medical professionals noticed the averaging, it was found that by inflating costs, they could increase the averaging and regain payment. Insurance companies objected to this so they recieved discounts to bring the costs back down. This brought about the in network and out of network distinctions in most medical plans. Because these were preferred partner discounts, they didn't count the discounted rate towards the averaging but the original rates.
Now enter government investments into the medical industry in the form of grants and such for research (mostly in public universities). This brought new costs and they were already expensive mostly due to knowing that whatever costs they would only recover a small portion of it. Universities were partial it not complete owners of patents involved and they expected this royalties to be income for their endowments.
What is left is a rate that is a magnitude higher than what insurance and government programs pay being charged to people not covered by either. There is an incentive for this to continue more because tax liability for hospitals and some medical providers became tied to an amount of free and reduced services provided to the poor and needy. Why do two of X for a lower effective tax rate when you can do one and count the costs as a loss.
Yes, greed has a lot to do with it. But the system is rigged in the first place. Poor people who don't pay only increase your costs if you do not have insurance or government coverage. The costs are inflated largely to get around government skipping out on their bills.
Now this doesn't cover the pharmaceutical industry who are riding the wave. They are somewhat tied to the patent system mentioned before but fund a lot of research themselves.