You can get it straight from the horse's mouth, they made when podcasts while building it. They're all still available and transcribed:

https://stackoverflow.fogbugz.com/default.asp?W4

Jeff + Joel decided they wanted to make a site together, mainly because experts-exchange.com, which was the biggest resource for us devs back then, were putting up paywalls while using dodgy SEO tactics. They refer to experts exchange as the site with the dash, some explanations in the first episode:

https://stackoverflow.fogbugz.com/default.asp?W6

A few episodes later, here's the explanation of why those chose .Net:

https://stackoverflow.fogbugz.com/default.asp?W56

The explanation's about a third of the way down (this is Jeff Atwood speaking):

We are not personally going to be language agnostic, because we need to actually build the site. And in terms of people actually working on it, Joel's in an advisory role, I'm gonna be writing code, and then a friend of mine, Jarrod, I'll be working very closely with. So it's sort of like 1.5 developers, so I need to actually get things done. In order to do that, I'm gonna fall back on what I know, and what I know is essentially ASP.NET. So ASP.NET is gonna be the platform. And I actually really like ASP.NET. There's things I don't like about the stack, like the webforms model, and so on and so forth, but as a core programming environment, I feel like it's more than up to the task, quite a bit of tooling around it that's gonna help us out. So I'm looking forward to that. I just want to get that out of the way early on as far as like technology choices. And also to segregate and say again, what we build the site in does not equate to what the ultimate StackOverflow site will be about, in the end. Technology choice doesn't matter. And Joel, you know that more than anybody else, with the whole Wasabi thing, right? Like--which I've come full circle on, I used to be very critical of that--and now I've decided, it doesn't matter. Because unless you're open-source, nobody's gonna actually see your--

When they first started working on the site ASP.Net MVC was just released, so they used it to avoid webforms. I'm sure they talk about it in later episodes.

Incidentally, when they were making stack overflow was when RoR was really just becoming the super-hip framework to use, but it was pretty slow back then. At the same time Django was also on the rise. If they'd have used RoR or Django I think they'd have had a lot more problems. PHP was still pretty icky and didn't have a decent MVC framework at the time.

At the time (and this probably still holds true) C# was much more powerful than Ruby, SQL Server was much more powerful that MySQL, so SO held together well even as it grew very fast, and the impression was that they got support from Microsoft because SO was a good advert on how powerful the .Net stack actually is.

I remember one problem they had with performance, but I thin it was caused because they'd put tons of logging in and it caused some sort of feedback loop.

Realistically, back then the choices were PHP without MVC, RoR, Django, ASP.Net WebForms, ASP.Net MVC or Java (Spring? Was never really in the loop with Java web development). Most people still opted for PHP.