Udp.beginPacket() time delay problem

Another thing which I don't understand is why this UDP implementation cares about if there is a remote device on the other end? My understanding of UDP is that it’s connectionless; meaning it just sends information on the network and does not care if the remote device receives that information or not.

It doesn't care, unless it is on the same localnet as the destination. Then it will try for a while to send the packet. If it can't, it drops the packet.