Why are planes allowed to fly with just one pilot? I chanced on this article which raises the titled question: Why aren't two pilots mandated for all planes esp. military? What happens if the lone pilot becomes incapacitated, esp. if the plane has passengers who aren't pilots?

Two captains of Cathay Pacific Airways lost sight during two separate flights, according to the Hong Kong Civil Aviation Department. In both cases, the first officer managed to land the aircraft safely.
[...]
On January 28, 2016, a pilot of the British Royal Air Force had lost sight during a training flight in a Hawk jet in North Yorkshire. Another jet had been scrambled with an instructor on board that helped the impaired pilot to land at RAF Leeming air base. Sources quoted by the Telegraph had said at the time that his vision was affected by the sudden deterioration of an eye infection.
Well I guess there are multiple angles to this. Perhaps someone can chime in with reference to regulations, but I can offer a more pragmatic answer.

Like it or not, aviation, like many other things, is a trade-off between risk and cost and I think that's what it boils down to. So what is the risk of single-pilot incapacitation and what is the potential consequences versus what is the cost to have all aircraft have at least two pilots aboard (not withstanding the impracticability of fitting two people in most single-seater aircraft.

So, I guess, we as a society have accepted the risk of single-pilot incapacitation and it seems that mostly the consequences are acceptable compared to the cost. It would be unlikely that we would mandate against single-pilot cockpits, but where to draw the line between single-pilot and multi-crew aircraft is certainly an on-going and active regulatory discourse.

In the end, I could ask you why don't we mandate two people with two steering wheels in cars? It would certainly prevent some accidents (hell, maybe many!), but it could also cause some too. And, practically, it just isn't going to happen is it?