It is a grey area and I am sure many people do exactly what you say, just say they were her visiting and decided to marry while here. If that is truly the case no problem.
The problem is immigration knows this as well and will be more likely to scutinize the evidence...like look at the date you buy the ring, or the day you reserve a wedding chapel..
You have to remember that the way this works is that immigration will ASSUME that the marriage only for getting a green card and you have to prove that it is real.
It just adds a complication that you really dont need.
As far as adjusting status, marriage alone will not prevent a person from being deported. You have to apply to adjust status in order to be protected while the processes is on going. So, it would be pretty stupid to get married and then wait to adjust status.