This is a good example of what is so sad about things like this. Flying is still one of the safer methods of travel, the chance of being a victim of terrorism are still remote, and yet we get all panicked every time anything happens(well, externally, terrorism aimed at abortion clinics never really bothered many). The truth is, no matter what we do, there will still be a risk, and terrorists will adjust their tactics based on what we do.
We should, obviously, learn from the mistakes that allow any attack to happen. In this case, I am not sure profiling would have helped, and of course, profiling by physical appearance is a lost cause, simply because as soon as we start doing it, terrorists will simply use people who don't fit the profile. Profiling based on actions is much more effective, and I am pretty sure we do at least some of that already.