Grounding... its a nightmare to get it perfect at times. The signal will bleed into an amps input without perfect grounds at all key points. The ground between your amp and guitar ground can be at different, but small, voltage potentials for many reasons. The different electromagnetic fields felt at the guitar, amp, and cables can change what the ground is referanced to between all aspects of the circuit. Basically, the guitar and cables need to be at the same or lower ground level of referanced than the amp in order for the system to be completely silent. That is why you will see grounds lifts on some amps. It can brake up ground loops in which grounds at higher voltage potentials will send a current INTO lower ground potentials. In an amp, that small differance gets amplified into sound.
In this case, if the guitar is turn all the way down but the signal bleeds into the input, the ground at the amps input is lower than the ground at the guitar, thus a small amount of voltage ( signal or hum ) is not being shunted completely to ground and out of the amp to earth. A small part of the signal is being reflected over some resistance between it and TRUE ground.
Metals are natural conducters of free electrons, but even a small piece of wire will have a small amount of resistance, measured in ohms or micro ohms. Thats why wires get hot in high current circuits due to something called I2R loses. The cross section surface area has some play but I'm not getting into that here. Metals also have a positive coefficient of conductivity. That means the hotter they get the more resistive they become but the cooler they get the better they conduct. Thats why super conducters are chilled with liquid N2. So basically in the case of the guitar, its ground will have a greater natural resistance than the amp due to the fact that there is a longer amount of wire between TRUE ground than that of the amp. Its the amps ground wire resistance + your cable and guitar ground wire resistance. In a perfect world metal would have no resistance. Now consider this; if you have a ground wire into the amp that acts as a resister...then some voltage ( signal ) is being reflected upon it and the input of the amp looks for that to then ampifiy. See where I'm going?
To compound the problem there is solder. A bad solder jount will act like a huge resistance ( far worse than metals natural resistance ) and the signal will reflect and drop a voltage over it and a high gain amp will really make it heard. Cheap pots, tarnished jack contacts, and other reactive components like cheap cables and capacitors will further the issue.
My advise is make sure you use good pots, clean the jack contacts, clean the switch contacts, use Mogami cable
, shield the signal carriers, and really pay attention to your soldering. Basic soldering can be learned in minutes but you have to practise to be very good at it. One can also lift the ground of the amp a bit to kill hum and ground loops but thats another topic.
Hope I helped.