For hydraulic systems to work efficiently they must rely on an in-compressible fluid as a means of transferring forces.
In hydraulic braking systems the input forces you create by operating the brake lever travel via the brake fluid to operate the caliper pistons, which in turn, move the brake pads to contact the rotor. This is only possible because the brake fluid is in-compressible.
Think of brake fluid then as a means of communication. The brake fluid transmits the message given at the master cylinder (lever) to the slave cylinder (caliper) with minimal loss in quality.
Air in the system causes a breakdown in this communication. Input forces created by operating the brake lever can no longer be transmitted effectively as these forces are wasted as the air inside the system is compressed.