First, poor negotiations by David Davis, who went into negotiations totally unprepared and with apparently no idea how the EU works - offering exclusive trade deals to Germany and France, which these countries legally couldn't accept (and practically wouldn't have been willing to accept). 

Second, a complete failure to understand that the EU would negotiate as hard as possible for the benefit of all of its members - of which the UK wouldn't be one. In any negotiations, you need to know what you want, and what the other side wants, and where there are conflicts, and how you would convince the other side to give you what you want, and there was a total failure to do this. If the EU was more strict and less willing to concede points than the UK anticipated, that probably came as a surprise to UK negotiators, but it shouldn't have. 

The problem with the Irish border was probably unforeseen. It wasn't unforseeable obviously, but it's one of those things that are much more obvious in hindsight. 

To a large degree, there were people who claimed loudly and still claim that negotiations would be a piece of cake, but most of them I assume were lying to themselves, to the public, or both. Either for reasons of promoting themselves (Johnson), or because they just wanted to leave the EU at any cost (Farage and Rees-Mogg).