One possible explanation I came across for this was that if you have an external force and you press on the body, the body's frictional resistance to motion increases and hence it should depend on normal reaction and not weight.
If the body rests on a horizontal surface with a coefficient of friction of μ, then the force normal to the surface equals the weight (mg) of the body and the friction force is μW.
But not all friction problems involve horizontal surfaces. If a block is placed on an incline plane with a coefficient of friction μ, and where the angle of the plane is θ with the horizontal, then the force normal to the surface of the plane is W cos θ where W is the weight of the body (mg). The friction force is then μW cos θ.
The friction force always depends on the magnitude of the force normal to the surface because that is the force that actually presses the surfaces together. Consequently, only the component of the weight that is perpendicular to the surface contributes to the friction force.
Hope this helps.
A friction force is a part of a reactive force, due to contact interaction between a second body and a first. The contact force has components which we resolve into normal and friction, but this is largely a matter of convenience.
In many (but not all) questions the reactive force is a reaction to the force of gravity applied by the first body. In this case the force of gravity depends on the weight of the body, and the reactive force is equal and opposite, according to Newton's third law.