I guess what they did works but it makes some of valid ip addresses unavailable.

Was thinking along the same lines; why do we hardcode a /24? Is that reality in ISP last mile networks?!

AT&T offers only a /25 here. But it's just a shell script, adjust to whatever your flavor is. You can hardcode in your own netmask, bits, and gateway without any issue.