This question already has an answer here:
In Harry Potter multiverse, there is a law called International Statute of Secrecy, referenced in Harry Potter and the Deathly Hallows since 1689 and the Harry Potter wiki says,
The law was laid down by the International Confederation of Wizards to safeguard the wizarding community from Muggles and hide its presence from the world at large. [1}: http://harrypotter.wikia.com/wiki/International_Statute_of_Wizarding_Secrecy#cite_note-DH16-0
The wiki mentions and sources that there was widespread persecution of wizarding children by Muggles, increasing witch hunts. Eventually after deliberations, the international wizarding community agreed to hide the entire wizarding world, including hiding magical beasts, beings and spirits from the wizarding world.
It seems to me, that wizards are afraid of Muggles. Also, this is referenced in the recent movie, Fantastic Beasts and Where to Find them, where MACUSA, the International Confedrations of Warlocks and President Picquery is so concerned of getting exposed. What would happen if the wizarding kind is exposed? And the real question is why do they need to be afraid of Muggles. Muggles are based on the book and movie examples of Vernon Dursley, Jacob Kowalski or even Senator Shaw, are naturally dumb, have a different physiology and simply cannot win any Muggle-Wizard scenario. Also I know actual history was different, but couldn't wizards and witches escape the witch hunts? I mean they can Apparate, use brooms, kill/torture/read and tamper minds of Muggles, who in my opinion are just like the 'weaker mind' in Star Wars and can be influenced. And another point is they could also manipulate so many magical creatures against Muggles: Dragons, Thunderbird, Basilisk, Spiders, Merpeople, Inferi, Dementors(Muggles have no cure), Giants, Werewolves, Vampires(maybe) and Muggles simply can't win in any scenario.
Even the Muggle Prime Minister says in Half Blood Prince,
Prime Minister: But for heaven's sake, you're wizards! You can do magic! Surely you can sort out... well... anything! Cornelius Fudge: The trouble is, the other side can do magic too, Prime Minister. -Harry Potter and the Half Blood Prince, The Other Minister
It seems clear that Muggles are scared of wizards and witches, not the other way round. Wizards should have no reason to expose themselves for they could anytime take control as Grindelwald or Voldemort tried.
Additionally, it seems odd that wizards and witches rely on this secrecy as if they are subservient to Muggles.