As a Brit living in Britain, I habitually code-switch, because my natural dialect is coded as low-status. If I used my natural dialect in a job interview, it would very clearly communicate one of two things - either I am unwilling to conform to the behavioural norms of a professional workplace, or I lack the linguistic skills to do so.
I cannot pretend to understand the cultural context surrounding AAVE, but the prejudice against my own dialect is broadly rational. Learning to speak in mildly-accented standard English is just one of many shibboleths that signify membership of the professional middle class.