Not sure what it is about ibuprofen specifically, but it is the best thing for tooth pain. Similar NSAIDs such naproxen and aspirin don't work nearly as well. When I was young and didn't have insurance, one of my wisdom teeth basically rotted in my mouth. It broke in half eating a PBJ sandwich. 800mg ibuprofen and it's like it didn't even happen.
That being said, ibuprofen isn't quite as good for muscular/joint/bone pain and naproxen works better. @Joe from WYconsult your doc before you begin a NSAID regime. In the past doctors had avoided prescribing NSAIDs for pain relief with fractures