I don't think anyone will ever know who or when.
From what I've read, it was originally cut to provide a place for the fouling to go while loading the next shot.
Spiral rifling was also tried and appearenty someone noticed it made the gun shoot straighter.
Of interest:
"From the beginning, round balls were used with the rifle, for practical and religious reasons, as the ball was easy to load, and the sphere was associated with the heavenly bodies, and helped to dispel the demonic connotations which became associated with the rifle.
The first explanation of rifling in 1522, by a Bavarian necromancer, was reassuring. The accuracy of the rifle was said to be caused by the fact that no demon could stay astride the spinning bullet, as shown by the sinless rotating heavenly spheres, as compared with the sinful stationary earth.
To settle the matter finally by experiment, the Archbishop of Mainz in 1547, had two members of the shooting club fire at a target 200 paces range. One shooter used lead balls, the other silver balls, deeply marked with the sigh of the cross and blessed by the Clergy. At the conclusion of twenty shots by each man, it was found that the lead balls had given 19 hits, and the silver ones, none!
This lead to the natural conclusion that the demons were actually guiding the spinning bullets.
The manufacture of rifles was henceforth forbidden, and all existing ones confiscated. Non-observance of the Edict was punished by burning at the stake....Der Hexenhammer (The Hammer of Witches, 1487 (?) described the means by which the Devil could be induced to aid markmanship."
Pictorial History of the RIFLE by G.W.P.Swenson pp8-9