You wouldn't stand outside another person's house after a first date, peering through their windows. You wouldn't send them a message of approval via a handwritten note slipped into their coat pocket. You wouldn't call their ex to let them know you exist.
When it comes to online abuse, there are many different laws that could be used to prosecute offences under, however these were never written with the online sphere in mind.
Online harassment is a difficult area to prove. When there is no assault involved it is hard to see sometimes in the eyes of the law how someone may need protecting.