Text on iPhone delivered weeks after I sent it?

I sent a text to a friend and fellow iPhone user a few weeks ago. I don't remember if sent as an iMessage or a text message or whether or not it was delivered or received, but she had never texted me back. A couple days later, after still no response, I had texted her again and everything worked. Today, I got a random text from her responding to my original text message that was sent weeks ago that she hadn't responded to. When I asked her about it, it said she had just gotten it then. Any explanation for this?

What did your carrier tell you?

Text messaging has always been an asynchronous communication method. In other words, it's uploaded to a server which then sends it when network traffic permits. Often that happens immediately, but as you may have noticed at really busy times like New Year's Eve or when major news stories break such as 9/11, messages can take many hours to arrive.

Sometimes they can't get sent at all and the server bounces the message back to the sender as being undeliverable. But occasionally an error occurs and the delayed messages get stored and aren't automatically delivered or bounced back.

That's likely what has happened in the situation you describe. Your only chance to find out for certain lies with your mobile phone service provider, so if you need to know then ask them. They might in turn discover that the problem was with your friend's service provider.

Asynchronous SMS and MMS is precisely what's led to the creation of Instant Messaging services.