Why did he apologize for checking out another woman?

I am good friends with this guy. It's a case of platonic friends who flirt heavily but it's just banter, you know. Today I went to go see him because I had a gift to drop off to him, and while we were chatting, he checked out another woman, caught himself, and apologized profusely to me. He then asked me if I ever checked out men, and I said of course, just secretly if they're hot. He then brought up my interest in a former coworker, purposely mispronouncing the guy's name and then making fun of him. He then wanted to know who I thought was the most attractive man we both knew, which I thought was a bit weird and didn't tell him. Why did he apologize for checking out another woman, though?
Why did he apologize for checking out another woman?
Post Opinion