Compiling a 4D database and running it in compiled mode can provides some benefits such as performance improvements and protection of code. Compiling takes the human readable code and translates it into machine language that the computer can interpret. When a database is ran in interpretted mode, it interprets the human readable code during execution which can add some overhead.
One thing to note is that if a database has been compiled then changes are applied in interpretted mode, the database must be recompiled to apply the changes to the compiled code.
It is also recommended that the database be compiled using the 4D version.
If a database was compiled in 4D 20.2 and then moved to 4D 20.5, it may still run in compiled mode. However, any updates to the compiler that would affect the compilation will not apply unless the database is recompiled.