Both gymnosperms and angiosperms bear seeds but then why are they classified separately?

Because the gymnosperms are plants that bear ovules which are not covered by any ovary wall and remain exposed. The seeds of gymnosperms are naked. But in the angiosperms (flowering plants) the seeds remain closed inside the fruits. So these two are classified separately.