Then after NDA's and a few other docs if a company accepts being purchased they have to give access to their internal docs. Finance books, IT, etc.
If during this "due diligence" period the buyers find a major red flag they might pull out, revise the price down, etc.
Personally I've never seen one of these discovery phases bring back anything remotely close to real life. No random IT manager alive is going to throw his dirty laundry out to a potential buyer and potentially torpedo a deal.
Some of the things I've seen/found during my company buying spree since 2015 have been magical.