It may be a bug in your case.
I've never had that problem in the six months that I've had my Tab 4 7.0. Does this happen in more than one spot? If it's happening in only one spot, like your home WiFi, then possibly something in the router needs to be reset as it isn't picking up your Tab 4's requests to log on quickly enough.
There may also be an app that's interfering with the WiFi. If you can figure out which app you last installed that needs a constant WiFi signal (like the facebook app if set to auto sync), you might need to reset the sync settings on that app. I'll take a guess that it might be the kodi app we discussed in another post that's messing with your WiFi. Try backing that up, uninstalling it, rebooting the Tab 4, and use it for a few minutes to see if the problem still pops up. (I don't have that app, as I'm satisfied with the few Chromecast enabled apps I use.)