If you do not teach your dog that staying by your side is not going to be rewarded with something good, they will always choose the choice of running to a stranger to play with. You have to reward them in making the right choice and have consequences for choosing the bad one. If you give attention to the unwanted behavior it is likely to reoccur. The matching law can also be used on humans and not just animals. Take for example, you live out of town and need to talk to your mother on the phone. Your mother has the option of being called on either her house phone or cell phone. If in your experience of calling her, she is more likely to pick up the house phone than the cell phone, then you are going to call the house before dialing her cell. This is what we know as the matching
If you do not teach your dog that staying by your side is not going to be rewarded with something good, they will always choose the choice of running to a stranger to play with. You have to reward them in making the right choice and have consequences for choosing the bad one. If you give attention to the unwanted behavior it is likely to reoccur. The matching law can also be used on humans and not just animals. Take for example, you live out of town and need to talk to your mother on the phone. Your mother has the option of being called on either her house phone or cell phone. If in your experience of calling her, she is more likely to pick up the house phone than the cell phone, then you are going to call the house before dialing her cell. This is what we know as the matching