It's more common in novels and games. But it happens in TV and movies too, take HAL 9000 for example. And you also have to consider that a lot of scifi shows predate deep learning, so it's often referred to as "the computer" instead and AI is reserved for AGI, usually with personality and a humanoid avatar.
In TNG the ship computer handled a lot of routines where the crew only provided high level input. It's advanced enough to run realistic holodeck scenarios.
Stargate Universe also had a ship that was mostly run by the computer and made decisions that were often inscrutable to the occupants and only made sense in retrospect.