Because his parents were here legally under the Domicile Law under the Jurisdiction of California laws at that time.
They were not here illegally.
The 14th Amendment is not for Alien law breakers.
What law are they breaking?
US law.
Ergo, illegals are under our jurisdiction. Ergo, their children born here are citizens. Simple as that.
By the way, did you read the case? Wong Kim Ark's parents weren't allowed to become citizens due to bigoted laws in the US at the time which excluded Chinese from attaining citizenship.
As the child of parents of an excluded race, Wong Kim Ark was Chinese, and it was believed by your bigoted political ancesters the exclusion applied to him, too.
But thanks to the 14th amendment, it didn't.
Same for the children of illegals.