Initial motivation was being a teenager without enough money to buy all the new computer games coming out. From there, it was partly just excitement using new technology that was relevant to the scene (Linux, high speed networks, cool ANSI art). In general scene cred was a big motivator. I also ran a BBS, and being well known in the scene also meant that artists made you great art for your board for free, which was a nice benefit if you wanted a cool aesthetic on your BBS.
Aside from cred, there were a lot of like minded people and back then it was hard to find locals who were into computers/tech, so it was sort of a social network of sorts on IRC back then, I made real friends that I still keep in touch with today, so in a way it was a shared social activity.
One fun anecdote: When I was like 14, I got on a PBX 1800# call with some folks in a group I was in and it kind of blew my mind that I was talking to someone in Israel. It was like the world opened up. That is not novel today, but back then the idea of socializing and sharing ideas with people across the world in real-time (for free) was extremely exciting. Keep in mind back then long distance cost per minute, as did much of the dial-up internet.
About law enforcement: not much. Because I did see that minors were usually spared any real consequences, I mainly avoided anything that involved profit (though I once unwittingly bought a stolen modem for cheap, when it's that cheap you kind of know). There was an uptick of paranoia when Kevin Mitnick was busted (in the town I lived in), but for the most part we weren't doing the same kinds of crime he did (some of the folks I knew were, one ended up in prison for ~13 years). I also stopped being involved when I turned 18, which was a smart move. I got a visit from the FBI or state police (I don't remember) once, and my parents nearly shit a brick, and gave me a stern talking to because they were freaking out, but it turned out they were looking for a flasher who had been going around on Halloween! whew!