First of all, lots of times e-coli gets found in the water because of a bad sample or someone taking it that doesn't know what they are doing. Realtors, homeowners and others are allowed to take these samples. When I take one, I run the faucet for at least ten minutes, then I spray alcohol all over the faucet including up inside the spout then run it again for a minute or so. Next take the sample carefully being very careful not to touch the bag on the inside.
If a house has been sitting for several weeks or months, the water can get an over abundance of bacteria growing in the pipes. When this water is sampled, the test comes back normally with TNTC. Too numerous to count. In that case, the well should be chlorinated and pumped through all plumbing to kill all the bacteria present. Then resampled. Letting the chlorinated water stay in the pipes for a minimum of 4 hours is recommended.
If the well is a surface water well, chances are it will always have e-coli in the water.