A Nikon F mount lens is small enough to fit (via an adapter) into a Canon EF mount camera.
Is this by design (IE did Nikon design the whole bayonet to be small enough, or Canon design the EF to be big enough) or just pure luck?
If you read Canon's public statements at the time the EOS system/EF mount was introduced in the late 1980's, they spoke of the longer 44mm registration distance and larger diameter flange of the EF mount, when compared to their existing FD mount that had a registration distance of 42mm, as leaving room for future capabilities. If they had been concerned with allowing non-EF lenses to be easily adapted to their new mount, they would likely have made the registration distance shorter than 42mm so that their current customers' own FD lenses could be adapted to the new system. Their primary emphasis, though, was on the all electronic communication between the camera and lens at a time when others, including Nikon, were attempting to enter the age of digital control systems using existing mechanical connections between body and lens. Canon boldly stated that it was time to make a total break from the past and create a new mount as modern as possible without regard to the usability of the pieces of previous systems.
Most early auto focus lenses by other manufacturers put the motor in the body and created an additional mechanical linkage to move the focus elements in the lens. Canon took a big risk and created a totally new system that they have been reaping the benefits of for nearly two decades in terms of superior performance when it comes to auto focus speed, accuracy, and tracking of moving subjects as well as the capability of all EF lenses to be fully functional with all EOS cameras.
The risk was that the new system totally abandoned the system their customers were currently using, so there was nothing other than the performance of the new system to keep their customers from jumping ship when the time came to replace their FD mount cameras and lenses. In that scenario, the last thing Canon wanted was for Nikon lenses to be perceived as superior to the new Canon lenses - with no customer base already entrenched around the new EF mount their customers would have simply moved from the Canon FD system to the Nikon F system (and some did just that for a variety of reasons) instead of to the Canon EOS/EF system! But the advantages of the all electronic connection and the improved performance for things such as action and sports photography also attracted a lot of Nikon users to the Canon fold.
I doubt very seriously that leaving room to adapt Nikon F mount lenses was much of a consideration. After all, the capability to do so was also there with the 42mm FD and FL mounts that Canon used from 1964 until 1990, yet actually mounting Nikon glass on Canon bodies was a very small niche sector of the photographic landscape at the time.
It's almost certainly a co-incidence. Adaptability of foreign lenses wasn't a big thing back then in the SLR world (it was more common with medium format cameras). The simple reason for this was that camera bodies were much cheaper as they were essentially just light tight boxes with a shutter, mirror and viewfinder (you might get electronic metering or an electronic shutter).
Whilst you might have to spend $2000 on a full frame body now, you could get a full frame camera body for considerably less. So if you really wanted to use Nikon lenses, you wouldn't mess around with adapters, you'd just buy an F-mount camera (it didn't even need to be a Nikon, other manufacturers offered F-mount SLRs).