A line like this, and its many variations, is really just a nice way of saying that you're just not into that other person.
I don't mind telling you that I've heard this plenty of times - from great guys as well as not-so-great guys. The one thing they all had in common was none of them really wanted to date me.
It's easy to believe the not-so-great guys might think they're not quite good enough. The thing is, self-centered and selfish people are usually not capable of admitting their flaws. So when a guy who has always been all about himself suddenly realizes he may have made a mistake - I'm skeptical.
Personally, I think this line is an attempt to lay guilt on the other person. The guy seeks to make the woman feel responsible for him being down on himself. The guilt-trip is a great way to manipulate her into accepting responsibility for the problem. Either he'll get her to take him back, or he'll get her to walk away. Both absolve him of any real responsibility.
Do I think every case of a guy apologizing is an attempt to manipulate? Of course not. I think you can tell when a person is being sincere, because that humility doesn't just materialize out of nowhere. If a guy has always been upfront, honest, and willing to take responsibility, chances are his realization is sincere. What he's really saying - even if he doesn't know it - is he's just not that into you.
But if a guy is always about himself, focused on getting himself out of trouble, or making excuses for things he's said and done - he has not suddenly come to the conclusion he could be a better guy.
Both of these guys are right about one thing - you definitely deserve a guy who absolutely adores you, is 100% into you, and isn't afraid to say so. Any guy who isn't all of those things really isn't good enough for you.