CP/M, a very old operating system for very old computers, used drive letters to distinguish between each drive on a computer. the first drive would be drive A, then drive B, and so on. CP/M computers typically had two floppy disk drives (drive A and B). when a CP/M machine was given a hard drive, it would assign it the letter C, so A and B could be claimed by the two floppy disk drives.
microsoft’s MS-DOS operating system aimed for some backwards compatibility with CP/M, to make things more convenient to port and to provide users migrating from CP/M with some familiarity. they kept letters A and B reserved for floppy drives, and labelled the first hard drive as drive C.
this behaviour was never changed as MS-DOS became windows. windows still labels the first hard drive as drive C, holding letters A and B aside for when you connect two floppy drives. windows still treats drives A and B differently from the other letters, even if you manually assign a hard drive (or optical drive, or USB stick…) to use it – it’s still running some compatibility code to make sure floppy drives work just right. even if what you connect isn’t a floppy drive.