Instead of walking the book one level at a time, the broker scans displayed liquidity and fires simultaneous immediate-or-cancel slices. Speed comes first, price second.
Sweeps are for urgency: closing a losing position, or getting in before a move you believe is starting. Expect several fills at several prices and an average-fill-price worse than the touch.
Example: you need 10,000 shares now. Displayed size is 2,000 at 30.00, 3,000 at 30.01, 6,000 at 30.02. A sweep takes 2,000 + 3,000 + 5,000 for an average of 30.015, all within milliseconds. A patient limit at 30.00 might have got 2,000 and watched the rest leave.
Related: intermarket-sweep-order, immediate-or-cancel