If it's been a while since I picked up my guitar, often I find a fun new riff or a new take on an old riff. If I happen to be recording, it helps me stay in the moment and not worry about losing the idea. I know from experience that if I stop myself part way through, connect my recording setup, then try to re-capture the idea it's often already gone.
A "creative energy sacrifice to the universe" is how I look at loosing the idea. It's not the end of the world, but I do prefer capturing the ideas to possibly use later.
When I recorded this (a couple days ago) it had been a few weeks since I played. I chose to get setup to loop record in GarageBand and have fun riffing over a drum loop from "metalcore drum pack 2".
I decided to add lead and bass after capturing the foundational riff for this clip. The foundation riff is lots of E string punishment, a little bit of straight 16th note beat with some swing, and some 16th note triplet gallop punctuated by a power chord progression.