Yes, removal of the registry entry will remove the compatibility setting. How it got that way is difficult to say but in most cases users manually make the change. In some cases if Microsoft thinks a program crashed when installed or run it will add it to compatibility mode.