Why large language models struggle with long contexts