It's all the bells and whistles that make the 4000 series more expensive. Also, the intended market is a bit different and that market has a different price point. The 5000 series are a utility tractor whereas the 4000 series are a compact utility tractor (although large ones.)
My father just got a 5045E after looking at the larger 4000 series tractors. He was upgrading from a JD 4400 HST that was nothing but trouble for the last 1000hrs or so. Since it will be used strictly for farm work the 5045E ended up being a much better choice for less money. The only drawback was they wanted a hydrostatic trans, but it turns out the sync-shuttle on the 5045 works so smooth that it isn't much of an issue. The 5000 series are surprisingly heavily built for their size, all the components are made overseas (India and China, loader in Mexico) but these particular tractors have been out for quite a few years now with little trouble. I've put about 30hrs on it in the last couple weeks and I really like it, a very smooth operating, solid tractor.
I don't have much knowledge of the new 4000-series, but I think they are based on the older 4500-4700 chassis tractors. There is just too much electronics on the new 4000 series for my liking.