in those problems they are just showing you how the entire deal looks like.
when you think in terms of the gain/loss on the contract, the underlying itself (which is by itself a separate part) also is undergoing a gain or a loss.
seller of the contract may gain on the contract, but could end up losing on the asset. So they are providing a total picture..