I would say that costs, availability of resources and infrastructure/efficiency. To give you some examples, we are currently evaluating the electrification of rails in Southwales. Electrification of the main routes sounds solid, as the costs for implementation and change of lines and trains will be profitable in the short term. However, less demanded routes will make the changes too costly, hence needing fuel-based trains and routes to cope with the long distance, short demand cases. In terms of availability of resources, there are locations where access is extremely poor (i.e. costal areas, stranded resources in isolated locations, etc.) thus requiring flexible power delivery in the form of a simple-to-handle fuel. Finally, if the infrastructure exists, and the efficiency of the process is higher than electric methods, there is no need to replace in the short/medium term the available energy source. Heat is one example, where most electric heaters do not have the same heating efficiency as gas-based heaters, and the infrastructure to deliver natural gas can be used for natural gas+hydrogen (up to 13% vol) without retrofitting. You might know that higher hydrogen content is under evaluation to use current natural gas lines.