Most likely one company came up with the design first.
Then other companies reverse-engineered the design to sell copycat parts.
Some customers might even insist that a second source of supply be available for such parts (linear regulators, jelly bean transistors, basic logic gates, etc) so it wouldn't help the original vendor to try to stop the copy-cat from selling their version of the part.
Is the silicon design simply licensed to both of these companies? Or do they purchase the device from the same fab house and simply stamp their individual brands on them?
Neither of these are very likely.
These are normally very low-cost parts, so it's unlikely anybody is paying license fees to anybody else for them.
And the margin on these parts is so low that they are really only profitable for integrated device manufacturers who can produce them at very low cost, rather than fabless companies.
What differentiates these devices?
There is likely to be some difference in performance between the parts from different vendors, if you examine the behavior beyond the guaranteed datasheet specifications. For example, the distribution of some parameter over 100's or 1000's of units may be different, or the way some parameter drifts with temperature may be different.
But the main things that drives most purchasing decisions between cross-referenced parts are non-technical issues such as:
- Vendor-customer relationship
- Most of all, price