Why does SDS-PAGE use for protein, and agarose use for nucleic acid?
You can use polyacrylamide gels for RNA and DNA, and this is the common way to examine shorter nucleic acids. Agarose gels can be used for larger nucleic acids like plasmids that are a few thousand base pairs long, polyacrylamide gels work better for shorter nucleic acids around a hundred nucleotides long.

You don't need SDS for nucleic acids, they already have a negative charge at the phosphate backbone. Polyacrylamide gels for nucleic acids also don't use a separate stacking gel like in SDS-PAGE, it is just one single gel.