I think there's still a bit of a misconception with Bipolar conditions, even in well-meaning and well-intentioned people, that people with Bipolar diagnoses are either "well", or "ill", when the reality is there can be a whole spectrum of mental states in between.
I've been misdiagnosed with Bipolar II in the past, I work in a mental-health related field, and at the point where I was misdiagnosed I was in contact with even more people with a similar diagnosis than I normally would have been. It's rare to meet two people with a Bipolar diagnosis who experience their symptoms in exactly the same way. I've never been psychotic in my life, yet I still ended up with a Bipolar diagnosis because I experienced almost life-long wild mood swings, everything from almost catatonic depression through to totally disinhibited behaviour and chronic insomnia.
I know when I'm not well my behaviour towards other people is not the same as when I am well and stable. I'm prickly and difficult, I can be acerbic, and I'll sometimes make a point of provoking a fight or an argument for no reason whatsoever. There is no excuse for it, but it is entirely down to my own abnormal mental state. I'm not like that at all when I'm genuinely well. I'm affable, easy-going, and tend to give people more leeway and consideration than they really deserve, but if I'm less than 100% that can change pretty quickly. I doesn't mean I am "ill", I'm possibly just in a slightly depressed state and feeling a bit ill at ease with the world, so that's reflected in how I interact.
It's common on here to mistake "excuse" with "explain", so while I would never suggest it's perfectly acceptable for your friend to behave they way they do, I think it's entirely reasonable to suggest that the Bipolar illness is possibly a factor in explaining their sometimes behaviour, especially if it's not typical for them and doesn't reflect the way they act all of the time.