He was just checking up. Maybe they have a description of a criminal and thought it was you? Happened to me in my Silvia at the Plaza, cop on a bike pulled me over, checked my license then said "were looking for a guy who looks like you. Have a nice night"
Or maybe the cop was bored and just wanted to talk to someone:P