Many laws exist in the Talmud that don't exist in Shulchan Aruch.
The most common cases are those that don't apply nowadays, like sacrifices etc... There are other areas that I don't recall being in Shulchan Aruch like Loshon Hora, which is an example of something omitted but followed (or at least should be followed).
There are also interesting "guidelines" for speech (see first few daf of Pesachim) like to not say words like "Tumah" (there are exceptions). I believe the Chazon Ish would not say the word "Dog" (people used this deragatorily by calling others a "dog"). Instead the Chazon Ish would say "four legged one" (in Yiddish). So this guideline would be followed by those who are scrupulous. Though I don't know if it is a "law" or simply a guideline for behaving correctly.
Similarly Chagigah 5a. To not spit and disgust someone. I can't say if it's a law, but Shmuel does hold that someone would be punished for doing something like this. It is brought down in Kaf Hachaim 116:70. But I see no source for Shulchan Aruch (though there might be one I don't know).
My best guess is that the Shulchan Aruch is built around the Tur and so you'd have to go and see how the Tur decided on which areas of Halacha to include from Gemara.
Interestingly enough see an example for why something from Tur was left out of Shulchan Aruch