Writing a single value to contract storage costs far more gas than performing thousands of arithmetic operations. The disparity is deliberate and reflects what each action costs the network over time.
Computation is transient, storage is permanent
An arithmetic operation is performed by each node during validation and then forgotten. Its cost is a moment of processor time, paid once.
A stored value must be retained by every node for as long as it exists, occupying space and slowing every future lookup.
The fee is charged once at writing while the burden continues indefinitely, so the price has to reflect an ongoing cost that no future payment will cover.
The gas schedule encodes that judgement
Operation costs were assigned according to the resources each consumes, with storage writes priced dramatically above computation.
Writing to a previously empty slot costs more than updating an occupied one, because it expands the state rather than modifying it.
Clearing a slot back to zero earns a refund, which is a direct incentive to release state that is no longer needed rather than leaving it in place.
Contract design follows the pricing
Developers minimise writes, pack several values into a single storage slot, and prefer recomputing a result over storing it.
Data that only needs to be observable rather than usable by contracts goes into event logs, which are cheaper because contracts cannot read them and nodes may prune them.
Patterns such as publishing a commitment on chain and keeping the underlying data off it exist for the same reason, and they change how applications are architected rather than just how they are optimised.
Reading is cheaper but not free
Fetching a stored value costs gas too, because it may require a disk access on a node whose state no longer fits in memory.
Repeated reads of the same slot within one transaction are cheaper after the first, since the value is already loaded and the marginal cost is small.
Reads performed outside a transaction, through a node's query interface, cost nothing on chain because no consensus work is involved, which is why interfaces display large amounts of contract data freely.
The underlying problem is unresolved
Pricing storage highly slows state growth but does not stop it, since a one-time fee can never fully compensate an indefinite obligation.
Proposals to charge rent over time, or to expire untouched state, address the mismatch directly but change assumptions that deployed contracts already depend on.
Until something along those lines is adopted, the fee schedule remains the main lever, which is why storage stays expensive relative to everything else the virtual machine does.