Those companies were able to clone the IBMPC because IBM made the mistake of allowing its partner, Microsoft, to license a virtually identical version of its PC-DOS operating system to any takers.
This opened the door for Honeywell, which started to make mainframes that were wholly compatible with IBM's products but cost less, and eventually, for the appearance of IBMPC clones.