There are of course many factors influencing the price, but the most important is:
The simple concept of supply and demand, when related to a business, aiming to make a profit.
Simply put, they can for instance, compare how much
profit they would make, at different prices that they could charge for petrol/oil, and therefore go for the largest profit available.
It can be elaborated much more than that, but a simple exmaple is this:
(As price increases, quantity demanded decreases....
)
The cost price of xyz is 10 cents per unit.
If they sell at
20 cents per unit, they will make 100 sales per day $10 profit
30 cents per unit, they will make 80 sales per day $16 profit
40 cents per unit, they will make 40 sales per day $12 profit
50 cents per unit, they will make 10 sales per day $4 profit
60 cents per unit, they will make 1 sale per day $0.50 profit
61 cents + per unit, they will make no sales per day $0 profit
Under this logic, assuming they have unlimited supply of the xyz good/service, they will sell at 30 cents per unit, as this is the price which they earn the most profit.
Normally, a lower price in the range would be seleceted, HOWEVER, in the case of oil, quantity demanded BARELY decreases as price increases, so a higher price is more profitable.