In this case, it's because the local variables are mostly optimized away out of existence. The compiler notices that you don't do anything with L2, L3, and L4, and just return 4*L1, so it just computes that. Also, since you have relatively few variables and haevn't specified otherwise, it can keep them all in registers.
int Locally() {
int L1;
100: 0f 93 push r16
102: 1f 93 push r17
int L2;
int L3;
int L4;
L1 = IO_TOGGLE;
L2 = L1;
104: 00 91 04 01 lds r16, 0x0104 ;; L1 = IO_TOGGLE
108: 10 91 05 01 lds r17, 0x0105
L3 = L2; ;; L2, L3, L4 optimized away
L4 = L3;
digitalWrite(IO_PIN, L4);
return L4 + L3 + L2 + L1;
10c: 8d e0 ldi r24, 0x0D ; 13
10e: 60 2f mov r22, r16
110: 0e 94 92 01 call 0x324 ; 0x324 <digitalWrite>
114: 00 0f add r16, r16
116: 11 1f adc r17, r17 ;; 2 *L1
118: 00 0f add r16, r16
11a: 11 1f adc r17, r17 ;; 2* (2*L1) == 4*L1 == L1+L2+L3+L4
}
11c: c8 01 movw r24, r16
11e: 1f 91 pop r17
120: 0f 91 pop r16
122: 08 95 ret
00000124 <Globally()>:
int G2;
int G3;
int G4;
int Globally() {
G1 = IO_TOGGLE;
G2 = G1;
124: 60 91 04 01 lds r22, 0x0104
128: 80 91 05 01 lds r24, 0x0105
12c: 60 93 06 01 sts 0x0106, r22
130: 80 93 07 01 sts 0x0107, r24
G3 = G2;
134: 60 93 08 01 sts 0x0108, r22
138: 80 93 09 01 sts 0x0109, r24
G4 = G3;
13c: 60 93 0a 01 sts 0x010A, r22
140: 80 93 0b 01 sts 0x010B, r24
digitalWrite(IO_PIN, G4);
144: 60 93 0c 01 sts 0x010C, r22
148: 80 93 0d 01 sts 0x010D, r24
return G4 + G3 + G2 + G1;
14c: 8d e0 ldi r24, 0x0D ; 13
14e: 0e 94 92 01 call 0x324 ; 0x324 <digitalWrite>
152: 20 91 0a 01 lds r18, 0x010A
156: 30 91 0b 01 lds r19, 0x010B
15a: 80 91 0c 01 lds r24, 0x010C
15e: 90 91 0d 01 lds r25, 0x010D
162: 28 0f add r18, r24
164: 39 1f adc r19, r25
166: 80 91 08 01 lds r24, 0x0108
16a: 90 91 09 01 lds r25, 0x0109
16e: 28 0f add r18, r24
170: 39 1f adc r19, r25
172: 80 91 06 01 lds r24, 0x0106
176: 90 91 07 01 lds r25, 0x0107
17a: 28 0f add r18, r24
17c: 39 1f adc r19, r25
}
17e: c9 01 movw r24, r18
180: 08 95 ret