Do you think the government forces people to go around looking to sell their stuff to people? Because if so you may be relieved it does not, but if you say you are selling X, and you see a black guy coming and say "Nah I won't sell this to you", and he realizes this is because he's black, then yeah, you're going to get in trouble, aren't you? And rightly so.
But there's no difference in what you're describing. You seem to be maybe indulging a fantasy where you're privately selling your bike to a friend and the government kicks down the door with armed police and some official says "NO, YOU MUST SELL IT TO THIS ASIAN PENSIONER WITH ADHD INSTEAD!!!!!", but like, obviously that's nuts. That's not a thing that's ever happened anywhere, is it? But on the other hand, if advertised it for sale, and then you decided not to sell it to someone because they were Asian, or a pensioner, or had ADHD or w/e, that would be bad.