It's important to remember the regulatory environment that IBM had operated in at the time.
For more than a decade it had been illegal for IBM to exclude 3rd party hardware makers from its mainframe market, beginning with the so-called "plug compatible" peripherals, which resulted in publishing standards for the IBM Channel interface, the prohibition on refusing to allow e.g. 3rd party memory for mainframes, and importantly, the requirement that IBM license its operating systems and software to run on any manufacturer's hardware.
This was the environment that the PC was designed in. The (IMO) open design - which was not an accident - was really the only possibility that IBM had while still holding to those earlier legal restrictions on bundling, tying, and license restriction.
The fact that Compaq could reverse-engineer the BIOS was inevitable given the market opportunity. IBM tried to hold on to that thin reed but it was a doomed effort. As the "PC Compatible" market took off IBM became irrelevant to much of the growth in the industry.
How does that fit in with the IBM PS/2 design, which was carefully closed?
It was a different era and the horses had left the barn. The PS/2 was a dead end. The original PC architecture, openly evolved, is still generating hundreds of billions in revenue each year - just not for IBM.
AFAIK, they didn't not, in fact, make it an “open design” intentionally. They published clear specs to encourage peripheral development, which also helped clone makers, but the BIOS was proprietary and had to be reverse engineered by clone makers to be legal. IBM sued several clone makers for infringement (largely for copying rather than reverse engineering the BIOS) and forced them to shutter, which presumably would not have happened if the design was intentionally open.