Those two are definitely not incompatible. Take Karia[0] for example, which is fully Free Software[1].
[0] https://store.steampowered.com/app/1261430/Kandria/
[1] https://github.com/Shirakumo/kandria/blob/master/LICENSE
Basically - tests, reproducibility, and dedication to tracking down "weird minor bugs" before they become "major show stoppers".
The Lua source code to the "base mod" is (necessarily) included in the game, and you can read it if you have a copy of the game, and the modding API is fully documented: https://lua-api.factorio.com/
https://lua-api.factorio.com/latest/
They also ship a full .pdb file with the Windows binaries (presumably for stack traces), so you can get a lot of information with dia2dump, or dig in with WinDbg.
Fun story:
Somebody independently recreated the core engine themselves to prove a point about multi-threading. Imagine recreating an entire game engine in 50,000 lines of C++ to prove a point, yeah, it happened: https://www.reddit.com/r/factorio/comments/jizq1b/comment/ga... What a legend!
Each section has an author, and only the Space Exploration section is written by the mod author. Most of the post is written by kovarex, who is the founder of Factorio, afaik.