Because citizens of Yugoslavia never had a "Yugoslav" national identity. The regime in the Kingdom of Yugoslavia pushed very hard for a unified Yugoslav state and nation, but failed miserably. Post war socialist Yugoslavia was from the start a federal state in which Slovenia, Croatia, Serbia, Montenegro, Bosnia and Macedonia were federal states. And Kosovo, while not a federal state, had the status of an autonomous region.
A Slovenian writer once said in 1913: by blood we are brothers, by language we are cousins, but by culture, which develops over centuries, we are further apart than a Slovenian peasant is from a (German) peasant in Tirol (Austrian region).