The bank loaned money against the value of the property, then acquired it (took title) through a foreclosure or deed-in-lieu–of foreclosure. Until that point in time, they had a vested interest, but no personal knowledge of the condition or history of that property.
Buying such properties is a great method for building wealth. However, when purchasing bank owned properties, the terms of the sale will be strictly “as-is with right to inspect”. You must order any and all inspections that you deem appropriate, and complete them within the allotted due diligence period.