It's true that if a company lets a potential merger candidate look too closely, and the deal then falls through, it may have given away its secrets for nothing.
A company can accidentally disclose secrets during the merger process.