To be the devil's advocate, you wouldn't want to pay your plumber for time on his pet project while he's working on your bathroom.
And I truly think it’s the same for your codebase.
I would like a competent plumber and if he does some fancy work in his spare time and gets even better than great.
But I would raise an eyebrow if beside my work he will also want to be paid for 6 hours he spent in the weekend, experimenting on his bathroom...
I'd expect if the plumber worked for a plumbing company they'd probably invest some time and money into skills growth, and pay for it out of the money they charge you.