Then why import at all?
The refined products sell for far more than the crude.
There's little doubt but that Saudi campaign contributions to more than a few politicians is behind the lack of development of oil and gas resources in this country?
When it costs more than the personal fortunes of even the most wealthy American to run for political office in this country, then the political office goes to the party with the wealthiest contributor, and no one can out contribute the Saudis.
As has been said before, "We have the best government money can buy."
Because it is not a perfect balance at all times in all locations.
And because we use more gasoline than diesel in a ratio that become uneconomic to directly refine. But Europe and some other locations use more diesel than gasoline in a ratio that is not as economic to refine.
So we import gasoline (mostly gasoline blending components) and we export diesel, helping our prices and theirs.
And some to winter swings gasoline consumption. And the opposite swing occurs in South America at the same time, as another example.
I did assume, you were talking about products and not crude oil in my previous response.
If you were including crude oil, it is because we don't produce enough of it ourselves.