My ex broke up with me because he's gay?🤔

After dating for 5 months he said he's gay! Why couldn't he tell me this from the beginning? Have any of you ladies experienced this?