Since your question seems to suggest that you think the two contradict somehow, at the risk of stating the obvious:
0.1mm = 0.0001 m
0.4µm = 0.0000004 m
The surface roughness specification is several orders of magnitude tighter than the flatness specification.
To add to this is the specifics of surface roughness measurement. They are not equivalent controls:
1) Surface roughness is typically only sampled over a small portion of a feature. If it is a large feature it may be measured in several places, but almost never in one continuous measurement.
2) Most surface roughness specifications are for 2D measurement (stylus moved in a straight line over a small distance). There are 3D roughness specifications and measurement, but this is less common.
3) The most common measurement tool for surface roughness, a skidded profilometer, will not take into account macro-scale form error - it will actually filter it out. A skidless profilometer would be necessary to measure the combined effects of macro and micro scale form error, but this is less common and much more expensive.
4) Many surface roughness metrics are evaluations of some kind of averaging of the surface variations. For example the Ra you mention is the AVERAGE of the peaks and valleys of a surface. I'm not even sure if theres a perfect analog to "flatness" in surface roughness ie: even Rmax which measures the maximum distance from peak to valley doesn't require that said peaks/valleys must lie between two parallel planes (or lines).