What are the biggest factors that contributed to that?
A significant portion of the delays and cost increases is a very simple increase in scope. It got bigger and more complex than originally proposed, all changes that are beneficial to the end product being more useful. So that's not really a problem or a mistake, they just decided to go bigger and badder.
But even after that, they're still way late and way over budget. I'm not on the systems side of things so couldn't give a really specific and intelligent answer. I'd guess that a big part is because of the size of the project, there are many different subcontractors and different corporations and institutions involved in building all the instrumentation and the bus. The more outside entities you rely on for a project, the more delays and cost overruns creep in. It basically reached "too big to fail" status. A smaller project would've been canceled along the way, but they had committed so much to this one that each time they needed just a little bit more, Congress basically had to say yes.