Why is the accent on "petrol" and "patrol" different?
Solution 1:
There is no reliable way to predict the stress pattern of a polysyllabic word ending in a single vowel letter (i.e. not a vowel digraph) followed by a single L. Some such words have final stress (e.g. lapel, canal, cabal) while others have earlier stress (e.g. label, camel, vial, metal, channel).
There also isn’t any simple link between pronunciation and etymology for words with this spelling pattern. As Janus Bahs Jacquet mentions in a comment, older loans from French are less likely to have final stress than more recent loans.
I think non-final stress is generally more regular for words with this spelling pattern, except for prefixed verbs such as impel, propel, extol, annul, compel.
Even though patrol isn't prefixed, I think the fact that it is commonly used as a verb might have contributed somewhat to its having final stress—both as a verb and as a noun. Even though there are some English noun-verb pairs that are distinguished by stress, such as record (v.) vs. record (n.), it's actually also common for nouns to have the same stress as identically-spelled verbs, as with report, surprise and account.
Solution 2:
Petrol is a light fuel oil that is obtained by distilling petroleum and used in internal combustion engines. The word is thus derived from petroleum.
Petroleum is a noun-adjunct, noun pair from
Ancient Greek: πέτρα, translit. petra, "rock" and Latin oleum, "oil" from Ancient Greek: ἔλαιον, translit. elaion.
Naturally, the stress is on the noun and not the noun-adjunct.
OTOH, patrol is from
Mid 17th century (as a noun): from German Patrolle, from French patrouille, from patrouiller ‘paddle in mud’, from patte ‘paw’ + dialect ( gad)rouille ‘dirty water’.
The paddle is the main subject and the dirty water is just a qualifing assistance. Patol is stressed on the paddle, pat-.