If the seller is cancelling the auction, but does not cancel the bids first, the item is deemed to be sold to the high bidder at the price current at the time of the cancellation.
Sellers sometimes cancel because the item has become damaged, or sold elsewhere, or was mis-descibed. Description errors can include errors in pricing.
EBay cancels fraudulent listings that have been reported to them.
A Buy It Now option allows the seller to accept an offer that ends the auction. Same with a Best Offer option.