The term slang refers to informal language and it is usually considered to carry negative connotation, because it stands out from the standard, formal language.
So the answer here is that the connotation of slang in the second sentence is that:
The word legitimate helps us understand this, that even though slang was considered a bad thing, through time those words gained full meaning and are now commonly used.