Why do friends turn on you out of nowhere?

I made friends with an Autistic woman at work. She was ten years older than me but I found her to be so nice and kind. Put effort into the friendship and even helped me plan my birthday.

As time went on “few years” she started acting more and more different. She started telling my secrets to other coworkers, commenting rude things about the way I look when I walked in the room and generally not supporting me through a few tough times.
I tried to let it go but her be-friending an ex friend who really hurt me in the past when I needed her support was the last straw.
I confronted her and she apologised and told me she really wanted to still remain friends. I believed her and a few weeks later she went back to her negative ways.

I have walked away from the friendship without any answer to why she started acting like this…could it be possible she just stopped masking and this is the real her? 😞
Why do friends turn on you out of nowhere?
Updates
12 d
Just wanted to come up with an answer before I put this friendship to rest.
Why do friends turn on you out of nowhere?
Post Opinion