Export modifier, not apply
It is up to the author of each exporter to support exporting a modified mesh.

Some exporters for example, could export without applying Subdivision-Surface, but use some option in the format that denotes the object as having it enabled (RenderMan RIB is one that can do this, Lightwave also supports). 

But in most cases the format doesn't support Blender's modifiers natively, its typically good if the exporter can write the data you see in the viewport/render (WYSIWYG).

All Blender's bundled exporters support this, so there are enough examples of how to implement this.