In reality, if there is a source of resource closer to destination, then the client would question why you're transporting from a further source making it unnecessarily expensive and you will not get a contract.
In reality, it's not the company running the rails that chooses where you buy coal. Simutrans tries to simulate this with some paks, since connecting more locations causes more cargo to be available, representing more companies choosing to order from that provider. The closest openttd comes is cargodist, but that is just redistributing the production to specific targets, so it relies on the player being "honest" and connecting up multiple producers/consumers.