From being a player myself, I know that there are usually two main reasons why basketball players wipe their shoes.
Most of the time, the players are trying to wipe the dust off their shoes and to put some of the moisture from their hands onto them, resulting in the shoes having a better grip (which usually results in quicker movements).
When players are sweating heavily, they want to get some of the dust from their shoes onto their hands so that the ball doesn't slip as easily from their fingers.
“Some of them (the players) like to get a little grit on their fingers if their hands are sweaty,” Bob Sheffield of Notre Dame says.
Or, as Sean Taylor of Quincy High School frankly puts it:
“This has been happening as long as I can remember,” Taylor said. “I think (wiping the bottom of your shoes) also turns into a habit.”