They have no ability to raise premiums on specific members with high healthcare costs.
This is not the case in most European countries that they use a mostly publicly funded system.
Decreasing the bottomline would literally decrease their profits.
It’s not clear that higher overall costs are always beneficial to insurance companies, because rising premiums might reduce demand for their products. This would depend a lot on the regulatory framework (ie.: which country or laws apply).
Public insurance companies in Germany are motivated not to deviate too much from the average results of other public insurance companies, but they don't have any incentive (besides the same one that applies to the state in general) to lower the costs.
Having dealt with the AOK on behalf of a neighbor to get a wheel chair since he cannot walk, I couldn't tell them apart from the welfare office with regards to processes and motivation of employees. Contrasting that with a private insurance (or a housing cooperative, as you mentioned them) is day and night.
In the end, they are dependent on federal policies and subsidies, so yes, they are technically not part of the state, but for all intents and purposes, they are: funding is decided on by the state, the covered procedures are decided on by a state-created and -controlled almost-but-not-quite-state-office (Gemeinsamer Bundesausschuß, which was created by the Ministry of Health but is nominally independent-ish, yet still needs to have its decisions reviewed by the ministry, and is able to set standards and guidelines which have the characters of a law). And like all bureaucracies, they are steadily growing and require frequent budget-increases.