Java 8 or 11 for 1.16 versions and Java 16 on 1.17 is quite jump I'd assume in code so modloaders will want to take advantage of that and the differences between those versions of Java possibly having different names/formatting of code or features.
Otherwise while 1.16.5 mods for Fabric were capable ports during snapshot they eventually didn't. It's best to just go with the 'strict' version of 1.17 only mods rather than thinking 1.16.5 mods will work on 1.17. If you still have mods you want on 1.16.5 than stick with 1.16.5 or just like many of us have fun exploring whatever new or old but quickly ported over is on 1.17 even for how few are there yet.
Forge I assume just like Fabric will need to have major changes to support 1.17 due to whatever Mojang has done and the Java update changes.
If your using Fabric myself and many others (referring to players not mod developers) have tested the differences. Forge will likely have 1.17 only support I assume. Only sometimes like 1.9.4 to 1.10.2 or 1.12 to 1.12.2, even 1.16.2 to 1.16.5 sort of situations where nothing too major happens can you have support across versions, they may be just 1 bug fix and aren't that different, but this usually doesn't happen often depending on the changes the modloaders have, Java or whatever Mojang does that requires a change.