Dear Student,
More than 50% of nucleic acid or even more , do not code for any protein. Their function is not known to us so far.
They can be considered as abandoned primitive nucleic acid whose function has been lost in the process of Evolution.
Many of the nucleic acids might have been derived from what we call mobile genetic elements from viruses or bacterial genomes.
There is a thing called pseudogene , which can be defined as a DNA segment having characters of a gene but it never gets transcribed actually. There are a whole lot of DNA stretch that eventually do not code for anything or are simply not functional in concern with coding mechanism.
Therefore as said, only 2% of the genome is responsible for coding proteins.
Regards