Mata was a poor buy because our squad balance at the time, and the fact that we tied down Rooney on to a massive new contract weeks after we signed Mata, meant there was never any chance of him playing consistently in the position/set-up he was truly exceptional in (a #10/SS behind a traditional striker), and he very clearly didn't have the attributes to play anything like his best football outside of that role/system.
As we'd cemented Rooney as our key player for the foreseeable future and he'd made it very clear he didn't want to play as a pure #9, the only way Mata was ever going to consistently start was on the wing, or in a bastardisation of his best role with Rooney constantly dropping deep and occupying his space instead of making runs in behind. On that basis it was bizarre to spend what we did on him, especially given we'd had similar issues getting Kagawa (who, whilst a very different player to Mata or Rooney, operated in the same areas) into the team over previous year and a half. In my opinion Mata also had some bad luck with managers as neither Van Gaal's or Mourinho-s' styles really suited him. We didn't make the most of him when he was at the peak of his powers and as he got older his physical decline exacerbated his weaknesses and he became less and less effective.
You can't really fault his attitude or dedication to the club, he always tried his best and never moaned regardless of where we put him and, yes, generally seems a great guy to have in the dressing room. Whilst I obviously don't think that justifies the money he's on, I don't subscribe to this idea that players have a responsibility to the fans/club to turn down or terminate great contracts. There are people in the club whose specific responsibility it is to spend the club's money wisely - they're the ones to blame for the contracts some of our fringe players are on.