This may explain the Man City one......
A player in an offside position receiving the ball from an opponent who deliberately plays the ball, including by deliberate handball, is not considered to have gained an advantage, unless it was a deliberate save by any opponent.
Offside law to read at...