It's not a bad habit IMO. You aren't pressing on the pick up, and it is common to use the pinky to balance when finger picking. For flat picking, I find I do the same thing, although my hand moves a lot depending on what I need it to do (mute, strum, etc). I still will hook "unused fingers" around the pick up for stability, balance against the pick guard or body... Whatever they feel like doing :)
I'd be interested to see if an instructor considers this a bad habit and why.
...so ever since then, I always hang on to the buckle.