A couple of thoughts that spring to mind, both liberally used in Star Trek episodes:
The android has a previously unknown program activated or a new subroutine inadvertantly installed, causing it to act strangely. The programming is triggered/installed by interaction with strange computer technology, an accident (disruptor shot or maintenance mishap), or an alien signal of some sort.
A bizarro alien "possesses" the android. This could explain all kinds of weird behaviour. Maybe the alien is actually a sapient virus downloaded form a computer system. Or an energy being that jumps from host to host trying to understand what humans are like -- when it gets to the android something really freaky happens to it. Or maybe it's a threatening alien "cloud" that just causes all shipboard technology to go haywire, including the android.
Hope that helps a bit!
LQ
Drunken DM and the Speak with Dead spell: "No, I'm not the limed-over skeleton of the abbot, and no this special key in my boney fingers does not open the door to the secret treasury! ... Oh crap."