You are right!!! that may be one purpose but that is not the actual purpose rather that IP is used by only by OS installer to find out preseed and late command server.  I have put only case for Linux but not for mac. Case for  Mac also needs to be put there.

If you use 10.0.2.2 or 10.0.2.3 then I am not sure that that is the IP used by underlying host. if that is not IP used by underlying host then we can't get late command and  preseed server even we had run then on 8082 and 8083 port on underlying host. So we are getting host IP dynamically to get preseed and late command server IP.

Any concern?