It is always a big issue whenever work is done without permits.
And yes, the onus is upon the buyer to do due diligence and research the property.
There have been several questions and blogs about the dangers in buying a home that had work done without permit. Of paramount importance is knowing the work was done according to cod because of safety and hazard issues.
During home inspections, we've seen where some remodeling was done in kitchens, new appliances were installed without upgrading the electric, or they were wired wrong --- just think of electric fires, gas leaks, etc.
Structurally, if a wall was installed, or a room was built out without permits, how confident would you be that the the roof won't fall in, that the wall will stay up, etc.
Regardless of whether or not the work was done before the current owner bought it, it was their decision to buy at that time. Don't make the same mistake this time.