I can understand why when ㄷ ㅌ ㅊ and ㅈ are in the 받침 since they require a stop to be pronounced, but I don't understand why when ㅅ or ㅆ are in the 받침, they are pronounced as a stop since they don't require one. Is there a reason behind this rule? Or maybe some historical reason? Thanks in advance.
Korean syllables may only end in single stops, either nasal or non-nasal stops, or in vowels. This is a defining feature of modern Korean phonotactics. Even if the hangeul shows two consonants, only one gets to be pronounced (think of nouns like 값 and 닭).
Both ㅅ and ㅆ are fricatives, so do not have plosive stops as components, unlike ㅊ and ㅈ. However, we must remember that a stop is not necessary a plosive. A plosive is a stop that has a release; in the case of ㅊ ㅈ the release is a fricative /s/ rather than a release burst like ㄷ ㅌ, so it is an affricate rather than a plosive.
However, if at the end of a syllable we do not release any of these consonants ㄷ ㅌ ㅊ ㅈ ㅅ ㅆ, we notice that they all have the same place of articulation (call it coronal, call it dental-alveolar, whatever), despite the fact that they would have very different releases. But because of the stopped, unreleased nature of Korean final non-nasal stops, the release does not matter; only the place of articulation of the consonant does.