After a quick look at Spain in WW2, it seems the primary reason was that Franco's demands for joining the Axis were straight up impossible. Germany would have to provide grain, fuel, armed vehicles, military aircraft and other armaments, as well as heavy fortification of the Canary Islands...