If you've ever seen a 777F, you've probably noticed that the main cargo door is located behind the wings rather than forward of the wings as is typical of cargo aircraft, with the 747 being a notable exception. The reason for this, and arguably most other things in the airline industry, boils down to economics.
When Boeing was designing the 777F, one of the obvious questions that needed to be answered was where exactly to put the cargo door. Using cargo loading equipment and a real 777 for reference, Boeing and 777F customers determined that keeping loading equipment comfortably away from the #1 engine forward of the wings would put the cargo door partly into the curvature of the fuselage where it begins to slope down to the cockpit section. While likely not an engineering obstacle for Boeing, the increase in cost to accommodate this curvature made it an unattractive option.
In the end, it was found that positioning the main cargo door behind the wings gave the loading equipment acceptable clearance while keeping costs to a minimum.
Photo credit: Nigel Howarth