The Munificent-class ship that sort of looks like a gun was a form of massive frigate used by the InterGalactic Banking Clan during the Clone Wars. The IBC never found any lifeforms of sufficient size which were capable of wielding and shooting Munificent-class star frigates, but they figured it'd be really, really cool if they could.
The frigate also acted as a sort of triple-changer: it could transform into a humaniform robot and something that kind of looked like a tank with treads that didn't work. A typical frigate carried a crew of over 150,000 battle droids... roughly 30,000 of which would be crushed when the ship transformed. Since the droids were dumb and cheap anyway, this was of little concern.