How were (many) dinosaurs' brains so small?
I don't think there is a concrete answer, because we don't really know the minimum size of a vertebrate brain in relation to body size. Many vertebrates, including many fish, get along fine with tiny brains in large bodies. 

For many decades, scientists speculated for this very reason of small brain size, that dinosaurs seemed to have an extra brain, or ganglion, at the hip. Especially sauropods and thyreophorans appear to have had a widening of the spinal cord cavity around the sacral area suggesting this possibility. This pelvic ganglion or "hip brain" was then presumed to be responsible for running the hind legs and tails. However, this idea has not gained any further evidence or traction in the scientific community and is generally dismissed.