Intent. Regardless of how good they control it (or not). Did they intend to play the ball? Another example - City v Liverpool in CL QF 2nd leg at the Emptyhad: crucial turning point when a cross comes in and a City player is offside (forget whom), and Karius flaps it against Milner, and it then goes to the offside player who taps it in. Mayhem ensues when the goal is disallowed, with City saying Milner attempted to play it. He did, in a reflex sort of way, off his thigh, and had there been VAR that season it probably would have stood.
So actually, it's quite a good rule.