To add to @Todd_Wilcox ‘s fine answer consider this:
If you pick up different guitars and play them without an amp do you notice differences? Maybe one has a body where you can feel the resonance and another not as much. Maybe one sounds beefy and one tinny. One might have very good sustain of all the notes where another might have dead spots and even another might have notes that die out very quickly. Others might have varying degrees of action height and neck relief which will affect how the instrument plays and sounds.
Even though a pickup only gets the magnetic signal produced by the vibrating strings (unless the pickup is microphonic, a whole other discussion) factors like the quality and type of wood, construction and setup will affect what that vibrating string sounds like before it even gets to the pickup.
If a guitar doesn’t sound good with nothing but a 1/4” cable directly into a clean amp I’d rather move on to the next one rather than start running it through pedals. Also, A guitar with a good fundamental tone will sound better than a mediocre one when you start to add effects and processing to it.