We should say that technically speaking, a brake master cylinder is not important.
If you like, you can use cable-driven brakes, like the cheap stuff you get on an entry-level mountain bike.
On the other hand, in order to withstand the pressure of holding off a ton or two of metal, plastic and humans for 10-20 years, the cable has to be huge.
There are more practical solutions, the chief of which is hydraulics.
Since liquids do not compress, they are ideal for transferring forces from one part of the system to another.
When it comes to your car's brakes, the master cylinder is the key component that makes it happen.

Picture a brake pedal in your mind. Delve into the relative darkness of that imaginary footwell and push that pedal with your mind’s foot. In most cars the pedal motion directly pushes a rod (known, funnily enough, as a pushrod) into one end of a sealed master cylinder filled with fluid, two pistons to displace the fluid, and springs to push back against the main force and return the brake pedal to its resting position when released.
Importantly, there are two exits from this tube. One leads to two diagonally-opposed wheels, while the other leads to the others. The two-line layout is a safety feature that ensures that even if a line should leak, you can still stop – albeit more slowly, with one wheel on each side and each end doing the job.

Let's assume normal operation.
Press the brake pedal to push two pistons, each sprung in a linear arrangement of piston-spring-piston-spring respectively, into the fluid, pushing the liquid along the pipeline into the so-called slave cylinder;
Usually located on the brake caliper itself.
The friction material is then pushed from the cylinder to the rotor.
Above the normally horizontal master cylinder is a vertical fluid reservoir.
Its job is to ensure that no (compressible) air enters the system, so that the system is adequately supplied at all times and during all phases of operation by maintaining an adequate volume of spare fluid.

It's as simple as that.
The brake pedal squeezes two pistons in the master cylinder, which in turn pushes the brake fluid down two separate pipelines, thus exerting equal pressure on all four wheels.
When the pedal is released, two springs behind the piston push back, effectively sucking the pedal away from the brake disc.
Now you know how the master cylinder works.

