Manual:$wgExportMaxLinkDepth

Details
If non-zero, Special:Export can be used to export all pages linked to or from the specified page, or from those pages, or from those pages, and so forth, up to a maximum depth governed by this parameter.

Since this can include an insanely large number of pages and could easily break a wiki, the default (0) disables the feature.