In middle school we learn that the vowels are split into ”hard” and ”soft” vowels. The ”hard” vowels are a, o, u, å and the soft vowels are e, i, y, ä, ö. In reality it has to do which vowels are pronounced at the back of the mouth and which ones at the front. But the logic is that it stays [g] before the hard ones and become [j] (softened) before the soft ones.
Because of historical reasons the consonants before the front vowels became more fronted as well, since it’s easier to say front+front. This happened gradually, and that’s why we have a split. This affects, e.g. [g] which turns into [j], [k] which turns into [ɕ] (like sh pretty much), and sk which becomes the ”sje-sound”.
This does not apply to loan words, since they were borrowed after this gradual fronting change (it’s called palatalisation if you want to look it up)!
Therefore, we have both kör [ɕœːr] (shurr) ’drive!’ and kör [kœːr] (kurr) ’choir’, since the latter was borrowed from French.