direction of globe and gate Valve
Fluid flow across a valve wears away (erodes) valve components. The closure components (the valve seat and disc) are components of concern because the ability to effect tight closure is affected by that erosion. Globe valves are designed for regulating flow, the fluid travel path is designed to cause even wear to the closure components when the valve is open fully or partially (throttled). Backward installation changes the fluid travel path and will affect valve wear, perhaps causing problems with tight closure later.

Gate valves are designed to be operated fully open or fully closed. If there is a preferred flow direction indicated by the manufacturer it may have to do with the valves designed ability to withstand a certain pressure drop across it when it is opened or closed.