I mean carded goods are still carded goods. I know that argument may not make sense but if something was bought illegally it is still bought illegally.
That being said, you shouldn't worry you're not going to get in trouble. You need to make sure that the IMEI is in good standing and it's not blacklisted on any carriers which you can search up the IMEI on sites to find that out. You should ask for that prior to purchasing. Otherwise, enjoy your new phone.