I built up a lock from castings and found that it was quite a challenge. I had to make a tumbler, my own screws, ad learned a bunch of things I had no intention of learning.
Does one really need to learn to build a lock? No, not with the high quality locks available. But back in the day of the colonial gunsmith, most guns were built with imported locks. I doubt that more than a handful of gunsmiths actually built their own locks or forge welded their own barrels.
You would build your own lock, then, out of curiosity. How does it work? What is the relationship between the parts? Learn the hardness and temper of the parts. The right geometry for the best spark, the right weight of frizzen spring to counter the impact of the frizzen thrown forward.
It is a tinkerer's dream, the flintlock. You learn a whole lot about the lock that will serve you for your whole lifetime of shooting the flinter. Learn how to tune a lock for best operation, to make a spring that will last for thousands of cycles without fail, to make a frizzen of the right temper and curve that will peel the spark for thousands of shots.
Do you need to build your own lock? No. But do you want to? You may want to venture in this direction. You can go as deep into this study deep as a scientist goes into studying the universe.