I don't know who decided (between Perez and Ancelotti), but Real Madrid made a mistake by being stingy with their spending last season, and they underestimated the conditions they are facing. They have the opportunity to bring in new players in the January transfer window, but they didn't take advantage of it, though they still have enough budget to spend.
That mistake has benefited Xabi at the moment because it is very likely that he will receive a large budget for his project, but that would also automatically put quite a big burden on him because everyone has high expectations of him.
I guess it was a case of mistaken identity and pride, Real Madrid were beginning to see themselves as invincible and didn't think any team could beat them even in their worse form, may be that was the reason they didn't bring in the kind of players befitting of their class and status.
After Tony kroos left to retire we thought they were going to replace him with a better midfielder since Luka modric was already ageing fast but we see any of these changes in the team and the outcome was really devastating and I wonder how next season is going be for them.