Why does a 4mm lens have a wider angle of view than an 8mm lens ?
When lens are specified in mm, that is the measure of focal-length. It works as you observed, a longer focal-length shows a smaller angle-of-view, assuming the senor or film is the same.
You can make a simple experiment to understand why. Find two tubes of different lengths, say the one inside a roll of paper-towel and one inside a toilet-paper. Close one eye and look with the other through each tube. With the longer tube, you see a smaller angle of view.
The principal is geometric. If you make a cone at the base of the tube and point on the other end, you get a certain angle at the tip. If you only make the length of the tube longer, then the angle at the tip is reduced.