My assumption is that engines were assembled on one line, and frames on another. When they come together, they didn't worry about numbers matching stuff.
If you've got a DOHC model, the Haynes service manual has a listing of frame number ranges and engine number ranges.
Luke M
Used to have a 1979 CB750L, sold it as a parts bike, now riding a slightly modified 1984 VT700C. Network/Field Engineer. Central OH, USA, Earth, Sol System, Milky Way Galaxy, Universe.