There's lots of factors that can vary a course price.
Some of them are regional/locations - business taxes, rent, utility charges, wages etc.
Some of them are operational;
- well paid, respected, experienced staff versus paying peanuts, or less to newly qualified instructors
- longer boat trips to reach better sites for the dives versus the nearest cruddiest site, or shore dive
- A fully equipped dive boat, adhering to applicable regulations versus ... well, not doing so.
etc etc etc
Other factors may include cost-offsetting - for instance, offering a lower course price, but recouping that loss through mandatory equipment sales... or a dive resort/hotel that offers cheap courses, knowing it'll make equitable profits through accommodation, food and drinks sales to those students.
I 'could' teach an OW course in two days... running all the training off the local beach in 2m viz looking only at turd-fish..and hitting only the minimum requirements for tuition...whilst taking a very liberal interpretation of the word 'mastery'. If I did so, I could reduce course costs by 2/3rds. I won't do that... my courses are upper-price range for my area... we go to the best sites, go well beyond the minimum standards in every respect and include a lot of extras. Everyone gets the time and attention they need... and the end results are well-trained, confident, competent divers.
Assuming that cost-offsetting balances out what you pay... then the main difference between course costs are determined by whether the price is varied by regional or operational savings. Regional savings are fair enough... if it's cheaper to travel, then go for it. Operational savings are often a wolf in sheep's clothing - make sure you're getting good quality and like-for-like amongst what is on offer...