If you use module bpy you create Non-Game-Python code.
This might be what is wanted as in your case (you are not forced to create a game with the BGE ;)).
But in most cases the authors want to create a game. Non-Game-Python code will prevent him from getting one.
Using bpy in a game is a typical mistake after reading help regarding Blender Scripts. It is usually plain copied from there as it is not clear to them that Blender and BGE are two different things. This image exist as this topic comes up from time to time. I hope it is a funny way to make clear to avoid bpy for games ;).