It wipes your heart meter with them so you can date or remarry or just go with someone else, It still allows you access to their room regardless of heart level though
Well, if you break up with your ex you're stuck at 0 hearts with them, so resetting their memory leaves them at 0 but allows you to start gaining friendship again.