The Ministry of Magic, as we know, is the governing body for the magical community in Britain. It is presided over by the Minister for Magic, who is effectively the wizarding equivalent of the Muggle Prime Minister, being the most senior official in the executive branch of the Ministry. There are apparently other ministries around the wolrd that perform the same or similar functions in their respective countries, e.g. in Bulgaria, and we come across the Bulgarian Minister in the novels. According to the Harry Potter Wikia the Ministry was founded sometime in (or prior to) 1629, and was the successor of the Wizards' Council. The Ministry has a number of responsibilities chief among which is maintenance of the Statute of Secrecy (although it is notable that this Statute was adopted by the International Confederation of Wizards sometime after the creation of the Ministry itself, in 1689/92).
Out of universe, it seems clear that the Ministry of Magic is intended to serve as an analogue for the parliamentary government of Great Britain. However, it is not clear in universe how and why exactly the Ministry would come to be.
Why would the magical community adopt an institution with procedures and representatives whose names and particulars seem to be derivative of the Muggle community and its governance? (For instance, the term "Minister" was used to refer to an official in the Muggle royal court who held a position of great influence with the King. Derived from Olde French and Latin, it means "servant", in context a servant of the monarch. The first documented use of "Prime Minister" was by Cardinal Richelieu of France in 1625, in his role as chief advisor to Louis XIII).
And what changed in or before the 1620s that made Wizards decide that the old Wizards' Council was no longer fit for purpose and needed to be replaced with a new governmental system? It is noteworthy that while the (Muggle) Parliament of England had existed for several centuries by this point in time, it was in the 1620s that conflict between the Parliament and the Stuart monarchy really began to come to a head, leading to the Petition of Right in 1628 where the House of Commons sought to restore liberties that they believed the King was infringing. This was followed not long after by the English Civil War as the conflict between the Monarchy and the Commons boiled over. Over the course of the 17th century as a whole, the English Parliament as we know it today would be born.
All of this begs the question: in universe, was there a comparable political development or conflict (or infringement of rights) in the magical community that could explain the (possibly near-simultaneous) creation of a new governing body, being the Ministry of Magic, at this time? And if not, why or how did the Ministry come to be founded?
EDIT: I have since found a link in the Harry Potter Lexicon which gives an alternative date for the creation of the Ministry of Magic of "in the late 1600s" (though I am not sure where it sources this information from). While this differs from the date of 1620s given above, it would fit in broadly with the observation that a change in governance of the magical community (the Ministry succeeding the Wizards' Council) must have occurred somewhat in line with historical events that greatly changed the nature of governance in the Muggle Society at this time - see also The Glorious Revolution of 1688 and the Bill of Rights (1689); the latter of which ended the absolute power of the monarchy, which no English or British monarch has held since. Again, is there a possible Wizarding connection to developments in Muggle governance which might explain the foundation of the Ministry of Magic?