Why does the operating system switch an active process to different cores?
Multitasking works like this: allow user process to execute for a little, then switch back to OS scheduler to be able to execute something else.

In multicore architectures, every core has equal opportuninty to acquire the process.

If you want to force your process execution on the selected core, this selection must be stored somewhere. There’s usually no reason to do that.