Well, the main reason why I started to learn how to develop a WordPress plugin is a bit long story, and I am sure that many of you out there has similar experiences. Let me tell you mine.
So the first reason is that I have spent so much money on different plugins, for different problems to solve.
The second reason is that I don't want to use a plugin for everything. So while you learn how to build a plugin, you will see that there are so much more and simpler options than just installing and using a plugin. For example, I am sure that instead of using 3 plugins for different purposes, you can surely add the scripts that those plugins are using into a code snippet, or add it to the functions.php. But that was just an example. The solution can be different in many ways.
The third reason is that I want to understand, how these things are working. I create websites and webshops for a living, so I want to deliver the highest quality that is possible. So damn sure I have to dive in if I want to be good in it.
Fourth reason: I am studying every day to become a full-stack developer. It is a good practice as well. You can practice PHP, MySQL, HTML, CSS, Js, version control, and many other things, by just finding a solution to your problems.
The fifth reason is to find a solution to your problems. Previously, I started to study plugins a theme development without a plan. I've just wanted to learn it, to be more professional. But It is much easier if you study it with an exact purpose.
For example, I have many unfinished projects, because I lost my interest in them on the way. But after a period, I ran into some problems that pushed me to dive in again and again. And as soon as I had some "personal" problems to solve - for example, environment dependency problems while developing a theme - I had the motivation to keep going.
Same with plugin development. I have bought several courses, to have a guided study curve. But it is just getting boring sometimes. Until you run into a "personal" problem in your everyday work. In my case something got my website slowing down, so I started to investigate in that way, till I found out there is no solution for my problems in that way that I want it to. So, let's develop a solution for it, that is personalized for my needs.
The sixth reason. If you get good enough, and your stuff is working well, you can earn some money as well. Even if it is just a couple of dollars, it still feels good, to get paid for something that you have done for fun.
So I guess if you are at the beginning of this road, you can pick one reason for this 6 above, and use it as a star in the night sky, so if you are lost, and out of motivation, maybe it helps to get you back on track!