This is something I’ve had to explain to a close friend a few times. It seemed like she would always get herself into a complex situation with her ‘emotional cheating’ because she wasn’t drawing the line with her guy friends. In the long run, this, among other things, led to the relationship’s end.
I feel that people have a misunderstanding of boundaries. They view them as walls that you put up, when really they’re just barriers to keep you and the other person stable. If you don’t practice boundaries you run the risk of having an affair (whether emotional or physical) or developing codependency.