Why not leave the door open to the possibility.
Now if B ALWAYS happens after A it's a no brainer. If every time you eat peanuts you break out in a rash you probably should stop eating peanuts. It if it happens "on occasion" maybe you should stop too. It could accelerate into a real problem. I know. It happened to me. With peanuts specifically. The "occasionally" may be a warning of what's to come if you keep doing it.
It's just the sometimes happens that gets a little iffy. Unless and until you research it and investigate it to see what were the "other" circumstances that might get triggered ON OCCASION?
It's not simple or easy to determine that. But shutting a door and locking it and walking away? How does that make any sense?