I see where you’re going with this, but… it’s not safe to assume that everything is local on one machine. Other applications sending messages to SC may be on other machines and not have access to the port file. Those other applications might even be on tablets or phones, where there are limitations on file sharing, and there is no easy way to customize the apps to grab a port number from somewhere.
TouchOSC, for instance, does not have a way to detect a specific ping message to identify the port number automatically. It assumes that you know the port number… which you don’t, if it’s being randomized at launch.