Commonsense Causality :
If there is a drastic/distinct change, and there are events seen immediately afterwards, which don’t happen otherwise, for a sufficiently long period, then you tend to attribute those events to that change.
More so if the change is known to / it is possible for the change to, cause those such events.
Logically speaking, it could all be a coincidence.
A cat enters your house and some time later you find the milk in the kitchen spilled.
You infer – the cat spilled the milk.
Here all the conditions are satisfied –
1) A cat entering a house is a drastic change
2) milk is rarely seen spilled otherwise in the house, over a long period
3) this happened sufficiently soon after the cat entered (not like say after 50 years)
4) a cat is known to / it is possible for the cat to upset things.
Consider this simplest thing – there is a liquid solution kept in a beaker for very long. You put a drop of a chemical in it and it immediately changes colour. You will attribute the change of colour to the chemical drop being put in. Now, logically arguing, this change in colour could be because of some OTHER factor/change/influence, AFFECTED in the liquid solution JUST AT THE VERY TIME you dropped the chemical drop.
You can never be certain that A is the cause of B, in real life.