It is a matter of how the language develops.
Normally, you would only hear "She is good at cooking."
'In' is technically correct, but you would never hear it.
However you WOULD hear "She is good in sports" AND "She is good at sports."
There is no logical reason that this is so, it is just how the language developed, as I said.