And whose space was it in prior to the Klingons, the Hurq maybe.
And whose space before them? Through the eons that area of space could have changed hands thousands of time.
The point is that if the planet belonged to the Klingons then the Baku went there illegally. Like if someone, unbeknownst to you is squatting a property that you own and someday you sell that property to someone, then they would still be there illegally, regardless of the change in owners.