Hi Shri,
In my thoughts AX is just trying to find an address set with purpose delivery. Probably it is related to the order how they are entered as there will be only one found. Other addresses should have alternative delivery as purpose. The primary address is only used when there is no address tagged with the delivery purpose.