The P-40 was effective because guys like Claire Chennault figured out how to use its strengths against other planes weaknesses.
There were far better fighters later, but they were what was there at the time.
What was that Pug guy flying? Was it a P-40?