I forgot to rename the school when applying my SOP to another school. How bad is this? I just realized that I referenced my desire to go to school A in a letter to school B (in fact, I did this by mistake for 2 schools!). Most unfortunately, I have already submitted the applications for these 2 schools so I can no longer change the letters. How damaging can this mistake be? The annoying thing is, I mention specific professors I want to work with from both schools, and these names are correct, but it's just the school name that was mixed up in the editing stages.
As a long time graduate program director, I've read thousands of these essays; this mistake happens in maybe 1 in 50 or so. I have already seen one this year, for example.

Here's the deal: If it's a generic statement of purpose that is not tailored to the school in question, yeah, it hurts a bit. It's an added signal that you're not all that serious about this particular school. If your statement of purpose is well tailored to the program -- or if you've created other contacts there, e.g., talked extensively with a faculty member interested in recruiting you -- the harm should be minimal.