I asked an airline if I could carry peanut butter with me in my hand luggage, and the airline asked me to contact the airport at which I was to board. This doesn't make sense to me. Shouldn't it be a standard for an airline rather than an airport? Better, it should be a standard for all airlines and airports.
I think you've misunderstood the situation a bit.
The airline almost certainly allows peanut butter on board along with any other condiment. They have no reason to disallow this unless they have specific rules to avoid food allergy problems.
You were referred to the airport because the more important factor is what you can take through screening at the concourse entrance. For instance, US TSA would probably consider a jar of peanut butter a gel or paste (crazy, but that's the Government) and confiscate it. Whole peanuts are perfectly fine.
Consider, you can purchase any number of liquids at or near your gate to take on the aircraft, you just can't bring them into the concourse yourself.
The people who make the decision are not employed by the airline. They are employed by the airport, or by the government of the country in which the airport is located. It is not possible for one airline to decide it's ok for you to bring peanut butter and another to decide you can't, then try to instruct the security inspectors accordingly.
There are some matters that airlines decide for themselves, such as accepting sports equipment (surfboards) and the like as checked luggage. They also typically set the size and weight limits for your hand luggage. They can ban things on their own account, but they can't unban things that the security agency has banned. That is simply out of the airline's hands. It's probably not the airport who decides, but the airport will have a copy of the rules, or will know who to refer you to next.
You will never see a standard for all airports, btw. Domestic flights in many small countries have literally no security inspection at all. I flew on planes where a passenger was carrying a machete wrapped up in newspaper. It wasn't even in a bag! That works for small places where domestic flights are unlikely terrorism targets.
In the US, airlines don't set the transportation security guidelines and decide what can or cannot be brought in luggage or carry on. That is the job of the Transportation Security Administration (TSA).
TSA publishes that up to 3.4oz (100ml) are allowed in carry on: https://www.tsa.gov/travel/security-screening/whatcanibring/items/peanut-butter
The reasoning behind what items and/or amounts are allowed/disallowed usually is not shared outside the agency except in obvious cases. I would guess that it is feasible to hide a sharp object or small explosive in a jar of peanut butter.
Governments are in the best position to know what attackers attempt, and set policies and communicate out to their agents. If airlines were to hold responsibility for setting and enforcing policies like this, they would become targets to receive the customer displeasure when items are not allowed/confiscated and would set rules keeping customer displeasure in mind and erring on the side of pleasing customers.
By airlines not holding that responsibility, the airlines can correctly claim "Sorry, I understand the frustration but we don't make the rules" and direct displeasure to the TSA.