How did so many serbs come to croatia during the habsburg ottoman times?

No, they were never a majority in all of Croatia.

However, they were majority in some regions.

"Vojna krajina" was established at some point as a defense line from ottomans for all of Europe and it was under direct habsburg rule (not croation). Serbs were purposefully moved there since they were already under ottomans and their territory was occupied. A lot of them simply moved there as escape from the occupation.

This is the same area that was most troublesome during the last war since Serbs really were a majority and also very much aware of their national identity. They were occupied, exiled, relocated and purposefully trained and militarized. It was a military defense line for centuries. Excluded from croatian rule.

I believe this is the aspect that is frequently neglected when this issue is revised from our (croatian) perspective.

/r/croatia Thread