Spray foam is kinna like glue, sorta. Weak glue! Makes you wonder what other work this person did there, or for that matter, anywhere else....
FYI, many years ago, I was told to "Cut in a box right there." So I did, someone else trimmed later with a door holder. We get called back... The cut-in box pulled the whole section of rock from the wall. I went to open the door, (with rock still hanging from the door, MC intact) and I had to put my back into it. It was a beast. Needless to say, I now know not to use your average box or bracket for the application....