It is (scientifically) true that the moon only reflects light, but it is still a source of light (not a direct source). Without this reflector the sun's light would not get to us at night.
Nigel J. Points out that my answer should be elaborated. I agree with him. I therefore am expanding this posting.
The important issue here is the Biblical view of the sun and moon. How did the biblical reader perceive the sun and moon?
There are numerous verses which suggest that rulers/leaders in general were symbolized in a variety of ways
They are compared to animals (e.g. Judah is a lion Gen. 49:9)
They are compared to plants (e.g. 2King 14:9 "The thorn (weak leader) sent to the Cedar (mighty leader)..."
They are compared to astral bodies (e.g. Nu24-17 A star shoots from Jacob, a leader arises from Israel, or Ps89-36:38 (David is compared to the sun and moon)
There are many more illustrative verses. It would follow that the Biblical reader saw the sun, moon, and stars, as sources of light and symbolic of power.
To return to the original question "But the sun is a source of light while the moon only reflects light," there are several points to be made.
i) My original point is that since the moon reflects light it is legitimately considered the source of the light it redirects
ii) A more important point is made by Frymer-Kensky
Gone are the days when we speak about an objective interpretation of the text. We now perceive all interpretation as an interaction between an observer and the text.
Modern man (you and I) care that the moon is not a made of fire; for example, we are able to travel to it. Modern man is also concerned about orbits of the planets and stars. There is no reason to impose these ideas on biblical man. Biblical man simply perceived the moon as a source of light and this in turn justified making it a symbol.