The early bikes didn't need brakes, because the crank was directly connected to the wheel. Applying pressure to the cranks would stop the rear wheel. But when the freewheel was in use, a new type of brake was needed. The first brakes were like wagon brakes, in which a brake pad pressed against the tire itself. This worked well with wagons, because the wagon tire had a steel tread to press against. The rubber of a bike tire wasn't as good of a braking surface.
So someone had the bright idea of pressing a brake pad against the rim of the bike wheel. An early version of this might be the first centerpull caliper brake, using the steel cable within a rigid tube invented by Bowden. This design was patented in 1903, and is not so dissimilar to modern centerpull brakes.