Your question is clearly expressed but there is no point looking for a reasonable explanation. Unlike say Spanish and German for example, but like English, there is no strict rule to phonetically convert written French to spoken French and only experience will help you learning the usual exceptions to whatever rule you might be teached, including the “STuPiD” one.
The historical answer to this question is: the “e” at the end of a word used to be pronounced (and it still is in certain phonological contexts, ranging from rarely to often, depending on the dialect, with rarely being more common). French speakers stopped pronouncing word-final “s, t, p, d” at some point, but in a word like “côte” the t was not at the time the final sound of the word. Later, the “e” became silent (in all standard dialects).
At this point, the sound change eliminating word-final consonants had already been completed, so that one still hears the “t” of “côte.” Note that French poetry and formal music requires one to pronounce final “e” in most positions, because the composition rules come from a time that this was more common, at least in elevated speech. (I find that in French pop, the singer pronounces the /e/ if and only if it helps the singer fit the right number of syllables into the rhyme!).
By the way, a similar change happened in English — a long time ago the vowels in “rate” and “rat” were the same, and the difference between the two words was that the “e” in “rate” was pronounced as a separate syllable. Then, we got a phonological rule lengthening the “a” in the presence of the “e” in the next syllable. Then, we lost the “e”, then we had a “great English vowel shift,” and now the spelling is very far from the pronunciation!