Even if your bank sends the cheque for collection and waits for the payor bank to confirm there’s funds there.
The cheque could have been stolen and forged, or a legitimate cheque could have been altered. There’s even an example up-thread of a bank recycling account numbers. The owner of the bank account it’s drawn against can take weeks or months to notice that the fraud has happened, and when they do the transaction can be unwound leaving your bank liable to return the value of the cheque.
When I used to deposit US cheques regularly in the UK, I’d be offered the choice between “negotiation” (we assume the cheque is good and will pay it this week) and “collection” (we’ll send the cheque back to the US and only pay you when we collect the money weeks later), but in both cases there was language on the form making it clear that they could pull the money back up to years later if something went wrong.
There’s literally no way of implementing cheques—-or most other payment rails—-without someone, somewhere choosing to extend credit and deciding to take on that risk.