Why does an airplane require 3 pilots on board?
Actually, for all but very long haul flights, airline aircraft only require two pilots, a Captain and a First Officer. For those long haul flights that exceed the duty time in a pilot seat, a relief pilot is also carried.

Older aircraft often also had a flight engineer. Technically speaking the f.e. wasn't usually required to be a pilot, but he was a very necessary crew member. You could say that airlines became more efficient crew-wise when they moved from 3-man cockpit crews to 2-man cockpit crews. For example, the 747-100/200 series uses 3-man crews, but the 747-400 uses 2-man crews. The change was made possible by using automation and instrumentation that wasn't available when the first 747 models came out. Indirectly the increase in engine reliability also helped. If you lost an engine in an 3-man crew 747, the typical manner of handling the loss was to have the first officer fly the airplane while the captain and the f.e. worked the problem.

To illustrate the increase in automation, the 747-100/200 series had, typically, seven or nine fuel tanks, and there was a fuel burn schedule that had to be followed to keep the structural stresses and balances between different levels of the tanks within limits. The f.e. took care of that, doing it manually by throwing switches on his panel. The 747-400 and follow on models do that automatically by computer.

Basically the number in the cockpit crew is determined by safety. There's the basic consideration that if you had only one pilot, and that pilot died or otherwise was disabled, that might well be catastrophic. Beyond that, though, there's the matter of what all has to be done and for how long. Pilots make mistakes, and the longer they've on duty, the more mistakes they make. And if an emergency occurs, the work load can get very high.

You can't reasonably compare an aircraft to a car for at least two reasons. First, a car is moving in only two dimensions, an aircraft in three. Second, a car can stop moving, an aircraft can't; it has to keep moving. Let's say your car loses power. Usually that won't result in anything more than inconvenience. If your aircraft loses power, you've got a much more serious problem. Most airline aircraft have at least two engines. Losing one isn't going cause a crash in most two engine aircraft, losing all power will.