The derivative contract is a separate financial product, its price can theoretically diverge from the price of underlying asset. This divergence is mitigated with liquidation mechanics: the margin positions are liquidated at mark price, which is calculated from an underlying asset price. This makes it rational for arbitrageurs to keep the prices of derivative & underlying close to each other. Derivative contracts can be used to create different payout strategies (e.g. options become profitable only after certain price is reached).
Read more here: https://medium.com/mark-price/derivatives-glossary-c249e69235b7