Short answer is that the state pays when activated by the state governor for state purposes, in accordance with Title 32 of the US Code, while the fed pays when activated by the POTUS for federal purposes, in accordance with Title 10 of the US Code.

Of course, as you noted, there are many baroque procedures to confuse things, the biggest one that the fed will sometimes transfer $$ to the states for state active duty, because NG on state duty can do things (law enforcement activities) that they can't do once federalized.