I am sure it was illegal, but I really didn't care at the time. In my younger less educated days I was a pretty good guy. Someone on the side of the road, I pulled over and helped them. Once on a cross country drive home I pulled over on a super hot day to help 2 didn't do nuffins on the side of the road. It was extra hot that day and I hated to see someone broke down on a 100 + day with no shade around. I pulled over and noticed one of the guys was reading a book like he really didn't care about being broke down. The two kept looking back and forth to each other as if to ask if they wanted to try to roll me. I had my normal carry knife and a ccw at the time, but that is always risky and always expensive. I could tell immediately they were up to no good and regretted pulling over for this particular car. I asked him if he was having trouble and when he said "yea, I think the battery is bad and it won't start". I am thinking to myself you usually find this out in hot weather when you stop and try to start it again, not while driving on a major interstate. I thought quick and told them "I'll see if I can jump start it, I have a little time I am off duty for a little longer". The guys looked at each other as if they almost went to prison, and he said that would be great, what do you do?" I told him I was a state cop. I never let them out of my sight, hooked up the jumper cables and when he started his car it was very strong, not like a car with a weak battery getting jumped. Later on I thought I should have left one clamp off my battery and asked him to try it now. Then there would be no question. I took off the cables, pulled out onto the road, and drove away very slowly while watching them in the rear view mirror. They never pulled back out on the road and I watched them for a couple minutes. I called the police and told them about the 2 Yutes broke down and also informed them about their behavior, everything except my claiming to be a cop. They said they would send an officer out to check on them. I also gave them the mile marker so they know they haven't moved.
I was young, in good shape, practiced martial arts, armed with a knife and gun, and still remember how that lapse in judgement might have gone really wrong. I carry daily, and only pull over for people I think can't handle it themselves. An old man on the side with a car already up on a jack, etc. Never turn your back on them if you do pull over to help.