All of the pipelines are tied together, same as the power lines, or the telephone lines..... the distributors open the spigot and fill their tanks. Even if the oil company owns the refinery the output is still still put in the same pipeline as everyone else. They have a meter at both ends to make sure what they take out is the same as what they put in.
The telephone lines are connected out of necessity, but not necessarily physically. The power lines are a bad example. There is an Eastern power grid. It covers just about everything East of the Mississippi. You may know that California is almost separate from most other states, but parts of California are separate from most of California. This is one reason why there are so many power problems in California.
At one time, it was explained to me that the power grids were divided by major fault lines. That is not strictly true, but there is a lot of truth to that.
For the pipelines, there are different systems. In some places, the pipelines run within 20 yards of each other, but do not connect. At one time, there was a connection, briefly. One issue that had to be addressed was a break in any pipeline, and the potential impact a break could cause. There are only a handful of companies pulling oil from the ground. Take Exxon-Mobile, for example. Many places get their fuel from Exxon-Mobile, then do their own additives, including ethanol. My understanding is that even Exxon-Mobile has different segments that aren't connected. My understanding is that there are at least 3 segments, but I'm not sure of the companies involved.
Some years ago, I worked with the president of the RCGA. Well, I still work with the person, but he is not currently president. Anyway, 7 of us went to a big meeting, and the pipelines were one of the topics of discussion. My capacity was not for the oil; I was the designated fall guy.
Ultimately, the oil pulled from the ground falls into one of several categories. Oil pulled from sand is one of the worst categories. The refineries all do the same thing, given the same categoey of oil. That rrfined oil is then trucked to various central centers. Eventually, fuel (gas) is mixed and trucked to gas stations.