For anyone else having this issue, I was able to solve it. It turns out that whenever the controller paired while emulation station was loaded it was moving my PS3 controller config to a cfg.bak file and generating a new config file. I was unable to do anything about this.
In the end, I used RGUI in the Retropie menu to set up the hotkeys for the controller in the actual retroarch.cfg. After saving the config file, I removed retroarch.cfg and renamed the file generated by RGUI to retroarch.cfg so that it became the config. Now when the new config file is generated for my controller, the hotkeys still function because they are hard coded into retroarch.