Stackoverflow was first, q2a is similar but has one really important advantage for the most webmasters, it is based on php/mysql.
Besides q2a development is user driven, with each new version new features the users asked for are included. That makes it more flexible and goes far beyond a question and answers script.