Good question. Why are some lenses variable aperture, say f/5.6 to f/6.3 as an example and another lens of similar focal length is a fixed aperture of f/5.6!
Well it comes down to engineering and design. The one with the fixed aperture of f/5.6 is actually much more complex to design and build, far more difficult! Why? Well the aperture is a mathematical calculation which divides current focal length represented as f divided by the diameter of the aperture opening measured in millimetres. Hence a lens of 200mm with a 50mm aperture opening would have an aperture represented as f/4 or 200/50=4. Now if that focal length changes to 300mm the aperture would need to open up to 75mm to retain that same aperture of f/4! This means that lenses which appear to have a fixed aperture are actually changing the opening or aperture size as we zoom in our out, increasing the diameter of aperture as we zoom out and decreasing as we zoom in. For lenses which are simpler design and do not bother to change the aperture here is what happens. Lets take the same example as above of a 200mm lens and a 50mm opening with an aperture of f/4. Now lets open that same lens up to 300mm as we did before but leave the aperture opening at 50mm, the aperture now becomes 300/50 or f/6! Now for reasons discussed in another blog, only very exotic and expensive lenses of the focal length mentioned are going to have apertures anywhere near what is depicted here in the example, most lenses of affordable budget ranges and 300mm length zoom are not going to permit apertures of f/4 but a number likely somewhat larger as the widest opening.
If you find this blog interesting and have topics you may be interested in then drop me a note and I will try to accommodate.