Uh, what? How did making blacks sit at the back of the bus improve economic efficiency? It may be argued that many legal systems, far from being a boon to economic productivity, actually hindered growth in many nations due to their use in oppressing underclasses for the benefit of a ruling "elite," i.e., rapacious predator class.
Reality isn't so nice and theoretically pure. People want power and they develop various systems to gain and secure their power.