At a guess, one day it had a kind of littery smell to it, and now its a habit. My hope would be that if you store it somewhere elevated the habit will die and not be replaced = problem solved.
It could be a litter smell to the dustpan, or it could be a sign of a UTI. A lot of cats will avoid the litter box if there is any pain going on when peeing. They associate the pain with the box and not their own body.
Getting the dustpan put away is a good start. And, if he begins using the litter box again, then problem is solved. However, if you find other pee places outside the litter box after that, then a urinalysis is in order to check for a UTI.