My theory is the like to flex and strengthen the claw muscles as some type of instinct.
Discussion
In all likelihood it probably serves a few different functions, stretching and strengthening would be way up on that list, I think. Might also be some sort of territorial marker. There is no doubt that a cat calls a place home when finding maul marks on objects within.