The reason why cats suddenly scratch at bags may be due to their instinctive hunting behavior. Cats are born with a hunting instinct, and even if they have been bred, they will often exhibit hunting behaviors. They may catch the bag because they see it moving and want to catch it. In addition, cats may scratch bags because they like to play. Playing is a natural behavior for cats, and they like to play by scratching, chasing, biting, etc. The bag is moving and may be a good toy for the cat.
So, if your cat suddenly scratches the bag, it may be because of their instinctive hunting behavior, or it may be because they like play. Whatever the reason, cats should be allowed to play safely while being careful not to allow them to damage property.