This narrow body style is the "hood" locomotive design favored by American railroads. Early American diesel-electric locomotives--and current engines--have the "cab body" or "carbody" design, where the locomotive body is the same width as a regular freight or passenger car, and the shell of the body is part of the structure of the engine. This allows the engineer to access the engine and electrical parts whilst being out of the weather, but it also makes it somewhat more difficult to do major repairs such as engine replacement.
The hood design is now almost universal in American freight locomotives, with a distinctly narrow body surrounding the engine and other components and a walkway outside. However, with the advent of the "safety" cab for the driver, the wide part of the locomotive has gotten longer, and the ever-larger cooling apparatus has produced large "wings" on the latest versions.