I have a Samsung Android phone which did exactly the same thing. I assumed a broken charging/data port and didn't do anything about it.
Much to my surprise, the problem disappeared when we happened to update the operating system some time later, so a software issue might be a possibility with the tablet.