frets contribute to the sound because the string apparently will vibrate longer on it. Like string vibrating against the fret has more sustain than string vibrating on just the neck. For violin family instruments, that's not a problem because you use a bow to prolong the note. But on guitars you don't use a bow so it has to be able to hold a note for a long time by simply plucking and that's what frets do