Each op code in the EVM has a gas price, depending on the complexity of the instruction. Eg. A store op costs more gas than a comparison op.
When you do a transaction, you specify how much ETH you will pay for one unit of gas. Typical transactions use 21k gas, but contracts need much more.
More info about why it's like that:https://www.cryptocompare.com/coins/guides/what-is-the-gas-i...
I often see 'gas required' 'gas limit' and 'gas price' terms confused, so careful what you read in the comments on the internet ;-)