"Regular" gasoline (87 octane much of the US, lower in the western states) was (is?) a commodity. What one bought at the pump was whatever 87 octane was available at the depot, regardless of the brand of the station.
High-octane (93 in much of the US, lower in the western states) is brand-specific. Pipeline loads are measured using clocks and flow-rates. E.g.: from 12:00 to 12:05, it's Brand X Ultimate. The pipeline flow-rate is used to determine what's in the line at the various depots.
The head and tail of the load are mixed, but if the high-octane is in the middle of a regular gas run, it's likely not a big deal. I don't know if it winds up in the purge tank or just a part of the other runs.
The intermediate grades were (are?) mixed at the station between high-octane and regular.