Because they're interacting with network stacks using OS-specific interfaces.
def enable_ip_forwarding():
os_platform = utils.get_os()
if os_platform == 'mac':
cmd = ['/usr/sbin/sysctl', '-w', 'net.inet.ip.forwarding=1']
elif os_platform == 'linux':
cmd = ['sysctl', '-w', 'net.ipv4.ip_forward=1']
assert subprocess.call(cmd) == 0