How does register type modifier work on different CPU architectures?
AFAIK "register" is just a very loose recommendation for the compiler; it doesn't mean the compiler has to put the variable into a register. Most of the time the compiler knows better where to put the variable and uses registers where possible anyhow. So often the keyword has not effect.

I don't know the detailed internals of PIC MCUs but in general processors have a limited number of registers they can use for operations (e.g. adding). If a function uses many local variables not all of them can be held in registers and at least some need to be located in external RAM. The compiler has some sophisticated strategy to determine which variables to keep in registers (e.g. the ones used most often) and which not (e.g. the ones that need to bee in memory anyhow because they are refered to by pointers).