When your WiFi turns on unexpectedly, check your downloaded apps to see firstly if you 'know' them and then check to see which ones have permission to turn on both the WiFi and location functions. Then check your running apps and see if any of your downloaded apps are listed.
(I'm not sure if your tablet is set the same but the following is usual for Android OS, although it may be 'customized' by the manufacturer e.g. Apps may be called Applications or Applications manager etc.
Go to Menu > Settings > Apps > swipe left to Downloaded > tap each app to enter, then scroll down to view permissions.
Then go to Menu > Settings > Apps > swipe left to Running > Scroll down to view running apps.
If you find one or more of your 'downloaded' apps you will have to work out why it has started in the first place, if you hadn't started it already.
Also you may wish to download, install and run Malwarebytes for Mobiles to see if there is any malware that could be causing this.
Here is a link