Indeed, if you export to pdf only a part of a drawing/file always the whole data is included. The part not shown just is hidden, not displayed. A weakness of pdf export. You can verify this by opening such a pdf in Inkscape. The drawing will at first appear as a single entity when clicked on it / selected. Do Object - Ungrouping (or however it is called in the English version, I only have the german one at hand in the moment) several times, and - tata- the whole content will become visible suddenly.
If you use an external Print to pdf tool like PDF-Creator, or CUPS - PDF in Linux, it is different. Files are smaller then, but not all invisible entities will be removed. Lines crossing over the border can not be cut apart.