Is company B allowed to take the full brunt of all the problems when there is a failure, or does government protect it by limiting damages? If company B's cheaper choice leads to harm and lets people and estates sue company B into the ground, then company A is a safer investment even if it has lower returns. If government interaction limits such recovery options, then that is what leads to company B's higher returns not also having higher risks, so they'll be the better investment. But that is a result of government intervention, not the economic system in play.