Granted, Dodongo isn't defenseless -- he breathes fire and has giant teeth -- but he isn't hurting anyone. He isn't even bothering anyone. He's just sitting in his circle pit, eating rocks. And it isn't like Link stumbled into Dodongo's cave and now has to fight his way back out to stay alive -- he went out of his way to go in there. Killing Dodongo was an errand in his planner.
But Dodongo is just one example of the bosses in the Legend of Zelda series whose only crime appears to be being trapped in a room with no exit. Take a look at A Link to the Past's Helmasaur King:
Because neither he nor Link can be bothered to look at each other.
Helmasaur's left foot can barely fit through the only way out of that entire chamber. Either the keepers of that particular dungeon built the entire thing around him, or they brought him in when he was a baby and just left him there for a decade. The same goes for his successor, The Wind Waker's Helmaroc King, who is really just a great big bird somebody trapped in a battle mask.
"Somebody take this goddamn thing off me!"