Is it legal? Yes. Ethical? Depends on Who You Ask.
Remember that someone else’s tradeline is indicative of their hard work and discipline. Not yours. Banks and other lenders use your credit score as a predictor to determine if you are a good risk.
Let’s be clear though. Just because you purchase a tradeline does not mean that you get to use it. Yes, it’s true that you are an authorized user on paper, but the actual owner of the tradeline does not give you access to the account.
A major downside is that if the owner of the tradeline is late, defaults on the loan, or closes/maxes out the card, it will negatively impact YOUR credit too… substantially.