Disc and disk are varient spellings of the same word that pre-exist computing. Disc is more common in British English, Disk more common in American English. But yeah since computing came along disk has also been used more for magnetic media (hard disk) while disc has been used more for optical media (compact disc). I wouldn’t be surprised if this only happened because of how the CD was marketed and branded as a “compact disc” as a trademark while hard disks and floppy disks etc were more generic terms.