It may happen unintentionally as well, as in my case. English was neither of my parents' first language, so I grew up in a household with two very different non-US accents. On top of that, we had lived in various neighborhoods in the Bronx of which a large chunk were foreign born. Nearly every kid I grew up with and went to school with had parents not born here. I spent most of my life (since 8yrs) in Italian neighborhoods (which eventually became more mixed over the years).
Even bits and pieces of accents I just happened to like have leaked into the way I speak, like a teacher from Boston that we had in high school. We used to beg him to say, "Paak thaa caa in thaa yaad." Anyways, apparently that layered into the way I spoke, and my "r"s weakened further than the norm here. One day, when I was living round Arthur Avenue (AKA Belmont), one day my friends born n raised there noticed that I pronounced Arthur, "Awwthuhh," so more extreme than I thought was normal for these parts. I basically had to reteach myself to pronounce "r"s more clearly again, rather necessary when you have the letter in your name but say it, "awwa," when spelling it out loud for someone.
Anyways, what happens in my case is that my accent shifts without me realizing it, depending on whom I'm talking to. And I don't mean just local, I've talked to say, Southerners, from my bank or credit card companies, and caught it shifting towards theirs. Then I have to concentrate to not sound like them, lest they think I'm mocking them or trying to appease them or that I'm just plain wonky.
I used to wonder what was wrong with me but then I heard Gary Oldman in an interview saying the same thing happens to him, that his accent unintentionally shifts in accordance to whom was talking to.
Not saying that's necessarily the case with Kamala, but as she was also raised in a mixed household and in neighborhoods where Indians in Jamaicans might have been rarer, that might explain it some. Of course, being a politician, that might be part of it as well, so who knows.