Trying to compare the Rules of Golf and the Laws of the Game (for Association Football) is like trying the compare chalk and cheese. If we look at it from a football referee's pair of eyes the decision against Lexi Thompson would appear completely ridiculous but in golf it makes sense given the rules as they stand.
The circumstances from which the decision arose is something different and the game of Golf has to consider these consequences so it moves forward in a sensible way but maintain the Rules of Golf in the modern age. This sort of trial by TV isn't unusual by the way and it occurs regularly but in this case the situation was slightly more unusual than most (I'll get back to it).
Firstly, it should be noted that Golf is played, for the most part, without the supervision of a referee or umpire. The game relies on the integrity of the individual to show consideration for other players and to abide by the Rules. All players should conduct themselves in a disciplined manner, demonstrating courtesy and sportsmanship at all times, irrespective of how competitive they may be. This is the spirit of the game of golf.
As I understand it, Lexi Thompson replaced her ball on the putting green in the wrong position. She placed her marker to the side of the ball, lifted the ball to clean it (as permitted) but when she replaced the ball, she placed the ball in front of the marker, not to the side of it. In theory the ball is now closer to the hole but also, the angle of the putt may have changed to avoid a spike mark on the green or a repaired pitch mark that could alter the ball's roll. This is a breach of the rule (20-1 by the way) and is subject to a two stroke penalty. Thompson doesn't have to declare this straightaway but her scorecard would be checked after her round is complete and must be 'signed for'. It should be noted that golfers exchange scorecards with their playing partner at the start of the round and they record both the scores on the scorecard before returning each others scorecard for checking and signing inside the scorers hut/clubhouse at the end of the round. This is the last moment available to Lexi Thompson to have declared her mistake because the onus is on the player to say she was wrong. Bear in mind, tournament Golf consists of 72 holes, divided into 4 rounds of 18 holes. This was day 3 and only 54 holes have been completed and she will have to sign her scorecard up to 4 times during a tournament. The tournament is not over and she is still liable to penalty until it is complete (possibly after the "weigh in", too).
For the most part, tournaments do not have enough rules officials to cover every player/playing group in a tournament but this was a 'major' event and would have had more than normal but they cannot physically watch and see everything that happens. From a rules official vantage point, he/she would have had a nigh on impossible task of identifying if the player replaced their ball incorrectly, they have have an incline but will only ask the player for clarification. The ultimate responsibility rests with the player and whether or not it was done deliberately is irrelevant. Getting branded a cheat is extremely damaging to an individual player who may lose opportunities to play and a damaged reputation as a result of it.
The greater scrutiny will come from television pictures which are clear and sharp and much better than the rules official will see. Therefore, the rules officials and tournament directors will use them to adjudicate and 'advise' the golfer before the scorecard is signed (witnessed by the playing partner, too who may also be the main beneficiary of the decision). The stimulus can unfortunately come from a TV viewer (although some have been outed as former rules officials). For all it's faults, it does act as a useful framework in preventing open cheating by players but it can be random and doesn't cover everyone. For example, who do the TV companies focus on during a final round? The leaders and the famous! Therefore, these are the players under greater scrutiny and that's unfair because not everyone in the field is being judged in the same way. For a player down the field, a forgetful moment is not picked up and a couple of extra places up the leader board is worth a few extra thousands of dollars/pounds/yen etc but for the contenders, a title can be won or lost. Also as I muted earlier, this was slightly different because the breach of the rule was noted the following day and Lexi Thompson was informed of this nearly 24 hours after it happened. A painful conversation to have for both the player and the rules official who tells her. How do you thing the rules official feels? Would you sleep well at night having knowingly ignored a rule infringement and seen the 'wrong' person win the tournament?
The R&A will now have to sit down with the USGA and discuss the rules in light of this incident but it could be that they react to the populist view and reject intervention by TV which is ironically, the opposite direction to that of football.