Much of the expense can be in the glass as much as the framing material. I don't get fancy glass materials like some here do. Custom sized glass is more expensive. Buying glass in quantity locally can save money if it's a factory made size. I can buy 16x20" glass for <$3 locally in quantities of 20 from a glass company (which does mostly windshields and window repair). Buying pieces in custom sizes or quantities makes thing expensive. Shipping it is expensive too, which is why I get it local, where they probably get it by the pallet or however they ship large quantities of glass. I order the actual frames online though, and cut the mats myself, which I order the material online for.
Trying to get walmart prices for this sort of product isn't always wise due to what Ian has mentioned about cheap pretend-wood mouldings. Poor wood frames also have poorly made corners and are apt to be dinged up.