All magic has a cost and if you refuse to pay it, someone else will. And after seasons of Emma doing the right thing (for the most part), resisting evil (for the most part), she is rewarded for her consistency with a gift few ever receive.
Margot and Lara Jean spent her entire childhood trying to make it up to her. So of course they weren't going to reprimand her. Of course they weren't ever truly going to be mad at her for long.