Why overhead bin was put on top of passengers head?
Because it is the most efficient use of space.

Due to the physics, specifically the way pressure differential is spread in a container as stress, a perfectly circular tube is the best shape for the body of an airplane, and a rectangular box is way, way, worse. Modern airlines have an oval cross-section, but it is still a lot closer to a tube than a box.

The question is than how do you allocate the space inside a tube. The widest floor area is in the middle vertically, so that is where the passengers go. Now we have roughly one to two meters of vertical space both above and below the passenger deck, not high enough to accommodate people but enough for cargo and storage.

Naturally you would want the heavy cargo to go below, and passenger storage to go above, for logistic reasons. Putting them on the same deck as the cabin would reduce the usable floor area for putting seats. You'd want maximum floor area to place the maximum number of passenger seats to increased revenue on the same flight.