The purpose of compiling Prolog code to the more low-level WAM code is to make subsequent interpretation of the Prolog program more efficient.
In order to write efficient Prolog programs, a basic understanding of how the WAM works can be advantageous.