Why is code scanning necessary?

For tickets and passes, code scanning verifies the validity of the product.

For occasional tickets (single ride), the code scan is required for validation.