There’s no reason why der Salat is masculine and die Pizza is feminine. That’s just how it is! But wait, there’s a third gender: neuter! Neuter nouns go with das and ein.