I think it's because a vaccine is generally a one-time event (yes, perhaps boosters or updated vaccines like the flu one) but individually, it's something that you get once and your body responds to it - compare that to medicines where you continue taking them, and they could possibly build-up in your body, or any effects caused by them could build up over time.
If something is only meant to be given to you once for it to have its effect, then any adverse effects should show up fairly quickly. There isn't really a mechanism for that to happen years later.
That doesn't mean that if there was an extremely adverse effect that caused some sort of issue for you, that the issue wouldn't be long-lasting itself. It is possible for adverse reactions to anything, and those effects could be long-standing.
But not really in terms of new adverse effects showing up a long time later, which is what I think people are worried about when they say that long-term effects are unknown.
In terms of the rare adverse effects, those aren't going to show up until a large number of people have been vaccinated - whether that takes months or years. It's the number of people that will show the effects, rather than the amount of time. So waiting to give the vaccine until a longer period of time has passed isn't really going to change anything; it might just postpone the time before someone has a rare reaction. And if a very large number of people have to be vaccinated before such an effect shows up, it means that the risk is very low - it only happens in however-many-million people.
That aspect of the testing is the same for all vaccines. Some of them take much longer to be developed, for all sorts of reasons (funding, approval, finding volunteers, variations in the prevalence of the disease, etc) but eventually, they all have to have enough people vaccinated for any adverse effects to show up. They will keep monitoring people and any reactions, as they do for all vaccines.
In contrast, the risks of long-covid are likely to be higher than the risk of any adverse effect. Those effects seem to be fairly long-lasting, too, at this point.
(As I understand it all; not claiming to be a vaccine specialist)