Because the code paths we traverse don't actually convert it. The reason the failure occurred was because the IP address returning from the db couldn't be properly coerced into netaddr.IPAddress unless it was first cast to integer.