Partly that, but mostly a beam's strength comes from it's depth not
width. The moment of inertia (directly related to load carrying
ability) of a certain cross-sectional shape = width x height^cubed /
12. So a 3/4" x 12" beam has a moment of inertia of 108, which is
equivalent to a 6x6 beam.
That said, you DO need SOME width to prevent twisting & buckling, but
it's not the primary load characteristic of a beam. Also, many times,
the beams are laminated with plywood or OSB, which does vary the grain