As far as I understand "40" is just short for "3.40.0". The expectation is that they will remain compatible with the 3.x.x series for a long time, so the 3 is somewhat redundant. This release contains more UI changes than usual, but it is very far away from the change from gnome 2 to 3.
And when Gtk4 inevitably happens, or the gnome-shell toolkit is changed again, breaking about all the gnome-shell extensions, we'll just call it Gnome X.
Gtk4 already happened. Not sure if Gnome apps to it, however, but I'm pretty sure they'll just break extensions as they've always done. Most use internal APIs AFAIK after all, so they're designed to break.
Software/package version numbers are just a marketing name. It's the ABI version number on the library (e.g. libgtk4.so.1 vs libgtk4.so.0) that needs to be changed if functions or parameters to functions in the original ABI in the older libgtk4.so.0 library are modified or deleted. It's very common to have two libraries of the same name being used side-by-side with some applications compiled against a newer ABI, and other applications compiled against an older ABI.
The problem with Gnome development is that library ABIs are just one of many interfaces used. There are also GSettings/dconf interfaces, D-Bus interfaces, file formats, etc on top of the usual conflicts in package dependencies (e.g. two packages wanting to write two different unversioned files to disk).
Gnome shell doesn’t even use Gtk, or at least not for drawing and such. If it’s there, it’s completely abstracted away in their JavaScript layer. And yeah, most extensions broke from 3.38-40 already anyway.