The URLs should be used for your proxy server allow lists and the IP Addresses should be used for your firewall access control lists. For some Office 365 network endpoints you should be bypassing your proxy server such as for Teams voice media and these need to go straight to your firewall and hence the requirement for IP Addresses.