Plenty of couples think about the possibility of one party coming to the UK on a visit visa as they want to be involved with the wedding preparations etc, and find that being apart at that time is a daunting prospect.
However, to be successful in obtaining a visit visa the applicant must show that they intend to leave the UK at the end of their visit.
Of course in many cases (as in your question) this is not the intention of the applicant as they want to stay in the UK and then get married.
Unfortunately you cannot easily get married in the UK on a visit visa so a Fiancé(e) visa will need to be obtained from the Embassy of your Fiancé(e)’s country of origin or residence.
If, for whatever reason you did manage to get married on a visit visa, your spouse would soon be tracked down and requested to leave. If she was not tracked down she would be an illegal and unable to secure leave to remain.
All kind of problems would follow, which I'm sure you wouldn't want.