Order Cancellation Is Risk Management
Many developers think of order cancellation as the opposite of placing an order. In reality, every active order represents potential market exposure. The longer an outdated order remains on the book, the greater the chance that changing market conditions will produce an execution you no longer want.
Professional trading systems constantly evaluate whether existing orders still reflect current market conditions. When they don't, those orders need to be removed immediately.