Autism can sometimes be associated with oppositional defiant disorder. If you're taught from a young age to not do this or not do that (or just notice it among peers as something considered "unacceptable behavior"), you can absolutely do those things for no other reason than to be a contrarian and it can go way beyond simple reverse psychology that a lot of people experience at one point or another. That can include things like racism.
You can also just be an autistic racist where the latter was not at any point informed by the former even if it's a terrible combination for actually vocalizing it. It's not a mutually exclusive concept. I would hope people that claim to be progressive would still exercise patience in situations like that though.