Most articles that mention his ban say that he banned it because of the money being spent on coffee. Coffee sent money outside of Germany and he wanted people to spend money on German beer and other commodities.
I wonder if it may have been some attempt to stop people from meeting in coffee houses, preventing opposition. Some people argue that coffee's introduction in the West led to many politicians, thinkers, etc. to meet in public and having clearer heads (not drinking wine/beer) leading to the Enlightenment.