Harley-Davidson had been building motorcycles since 1906. BMW got a much later start, around 1921; but by the time World War II rolled around, BMW’s design & engineering was already world-class.
In the 1930s BMW had mastered the emerging production method of electric arc welding, and were able to create incredibly strong joints. This practice was borne of necessity; sidecars were popular in Germany, perhaps more popular than in the ‘States, where Americans aspired to ride around in automobiles. Sidecars placed a lot of stress on a motorcycle frame. But in thrifty Germany, with one passenger in the sidecar and another behind the driver, a sidecar-equipped motorcycle was an economical way to transport three people. BMW made their frames strong enough to handle that load.