Yes an insurance company can deny the insurance coverage if they find a reason to deny the insurance coverage.
Whether for homeowners insurance, car insurance, life insurance etc they can deny you coverage even if you've paid a bunch of money into their system.
Homeowners insurance, car insurance etc can be denied coverage due to non payment, too many claims, etc.
Even if you live in a high risk area then your homeowners insurance can be dropped and denied coverage for something happening.
Homeowners insurance will not cover any pre existing damage to the home.
When you get homeowners insurance for the first time the homeowners insurance company will send someone out usually to inspect the home and look for any pre existing damage to the home.
Then the homeowners insurance company may or may not sell you the homeowners insurance policy.
The homeowners insurance agent or person who comes to your home will usually tell you if you need to do any repairs to the home before they will insure the home.
And you also need to maintain the home and keep up on the paint and other repairs to the home or the homeowners insurance coverage may be dropped.
So if you have pre existing damage to the home you need to repair that damage first and then get homeowners insurance on the home.