Most of the folding bikes I've seen, which are used for urban commuting/recreation, usually have MTB components except for the big chainring. If they're going to be ridden most of the time on paved roads, why not use road bike components?
I think the market drives this -- not necessarily just the folding bike market, but the component market.
Mountain bikes have been the predominant type of bicycle for the past thirty years. This has meant that every manufacturer has a line for very, very inexpensive mountain bike componentry. If you want to build up a bike on the cheap, you use mtb hardware.
Finally, related is that most adolescent-size BSOs are also mountainbikes - which further drives down price on those components with the added benefit that they fit folding bikes better.
tldr: Most folding bikes are not sold by virtue of their component line (unlike road bikes) but on the basis of their folding mechanism. Most buyers will see "Shimano" gears and be happy -- not knowing it's the bottom end plastic Shimano for a BSO mtb.
There is also some physical factors that also play a role, notably the brakes. Most folding bikes have 20" or smaller wheels. Because the wheels are smaller, the tires have to be wider to provide resilience and suspension. The brakes also have to be stronger and "grabbier" because the smaller wheel torques on the brakes more. So you want cantilever or V-brakes for the reach around the fat tire -- or disc-brakes. Final nail in the casket, you have to consider which brake handle styles have the right pull ratio given that folders don't have drops. One of the few folding bikes that has road-style caliper brakes is the Brompton - and it has custom brake levers and has been heavily criticized for its poor braking. One of the few folding bikes with drops and calipers is the Tern Verge X18 below, which is a niche-niche bike. So in general, considering cost and effectiveness, you end up with mtb style brakes and brake levers. Christian Lindig has also mentioned the derailleur but there are some considerations there (long-cage mountain derailleurs don't work on stubby wheels) that complicate a response.
Road-bike specific components are designed for weight not strength. MTBs are expected to survive rougher handling. Although folding bikes don't want to be heavy, they need to be tough, often getting knocked over onto drivetrain components, or bumped into doorframes, etc.
Other bikes built for mainly on-road use but not top speeds also share components with MTBs. For example plenty of hybrids use MTB gears even if their wheels have more in common with tourers (at least mine does, some others use road components except the bars)
Road bikes have short rear derailleurs which are incompatible with a cassette that offers a wide range of gears (like 12T to 30T in 10 steps) - they are designed to offer smaller steps over a narrower range (like 11T to 23T in 10 steps). A strong motivation to use an MTB rear derailleur is to offer a wide range of gears as there is typically only one chainring in the front.
As noted by another answer, a long derailleur is a problem for the small wheels used on folding bikes. As a result you will notice that the chain runs very close to the ground - and will pick up dirt from there.