Is there any particular reason for the cockpit of the 747 being on the upper deck?
Boeing actually never expected the 747 to be so successful. They thought supersonic aircraft were the future. But Boeing knew that an aircraft the size of a 747 would be great for the cargo market. So they designed one aircraft that could be easiy converted into a cargo version.

The cargo 747s can literally open their nose. It is quite impressive. To accomodate this, the cockpit needed to be on the upper deck. Hence the passenger version had the same requirement.