I didn't see this coming with this guy I met at work: why didn't he mention this relationship status?

So we work in the same service in that firm and spend a lot of time together every day, quite logically. He is gentle, a genuine guy, he walks me every evening to my bus stop, sometimes he even makes a detour and takes it with me to keep talking. He knows the area better than me so he also shows me around and we have lunch together very often. He's had flirty gestures (putting his hand on my lower back, when he hugs me goodbye he lingers a bit and has soft eyes, once or twice he even softly kissed my cheek), he compliments me sometimes and he seems caring (the other day he went ou without telling t to buy me coffee as i was tired) etc. We get along well, talk a lot, including about relationships, he never mentionned a girlfriend... but on Friday night as we were leaving work and walking as usual, i asked him what he was gonna do that evening. At first he said he was gonna meet with some friends, but after walking a few more minutes, he confessed to me that he actually had an appointment with his girlfriend to dump her cause he he didn't love her anymore and he needed to have the honesty to do it. I was shocked, he never mentionned her.
They've been together 2 years apparently. But still, before meeting her he spent 2 hours with me. But what should I think of that? Why did he delibarately not mention her?
I didn't see this coming with this guy I met at work: why didn't he mention this relationship status?
Post Opinion