As I outline in my Comment, this is a little too broad for the SE format.
To answer the title query though, primer should help paint adhesion.
Specifics are important though starting with the primer type and paint type, regardless if the same or different1. Other details matter, possibly more, and any or all of them may be factors when there's an unexpected failure such as you experienced. These include, but are not limited to:
- Incomplete drying of the primer before painting.
- Inadequate curing of the paint before exposure to the elements.
- Primer or paint not being mixed thoroughly.
- Adverse drying conditions when primer or paint went on2.
- Application caused the surface of the primer to end up too slick.
- Something in the wood caused the surface of the primer to end up too slick3.
It is of course possible that nothing in the environment contributed to the issue and you did nothing wrong. It could just be that the primer or paint was the cause. So last but not least:
- A bad batch of the primer or the paint.
To try to bottom-line this for you, if you used a primer/paint system within the guidelines then this should not have occurred and the best recourse would be to contact the manufacturer concerned and see what they have to say. Give plenty of detail in your email, including batch numbers if you can find them on the cans.
If you used non-matching primer and paint however all bets are off; while you might get some on-point suggestions of possible causes from one or both manufacturers they may be unwilling to commit to anything more than the expected recommendation that you use their primer and paint together to ensure reliable results.
I'm deliberately taking the following out of context because it's a highly related point that is worth addressing individually.
why are we applying a primer to begin with
Obviously because it's supposed to help, however, that's NOT to say you can't paint directly on to wood.
In fact in numerous situations you can paint directly on to bare wood surfaces and get perfectly good results. This was the norm in various places and times historically when there was either no primer or no access to it, so they had no choice but to just use the paint. As well as this, some paints4 just work best if applied straight to wood.
Some things can be done to help ensure good results, such as:
- Make sure the wood is clean before starting. This is always good advice anyway, and is especially important if using waterbased paints of any kind.
- Dilute the first two coats, the first heavily the second not as much. Note that this may directly contradict the manufacturer's instructions.
- Apply enough paint that you're confident you don't have thin areas or gaps. Be especially vigilant about missed spots around any joints. So if you have any doubts that the third full-strength coat was enough do apply a fourth coat.
- Wait long enough after the final coat has been applied before putting the item into service5.
1 They don't have to be the same to work well together, but it can (should) help if they are both of the same type.
2 Both too fast and too slow can cause issues. Paint can dry too quickly if for example there's direct sun on it immediately after application, or if it's just too hot; it can dry too slowly if the humidity is too high and/or the temperature is low.
3 The rising of 'extractives' through the primer coat, settling on the surface, will cause adhesion problems whether to the next coat of primer or to subsequent paint.
4 Including exterior linseed-oil paint, milk paint and some other old formulas.
5 This is to ensure proper curing; this usually takes much longer than we think, even for waterbased paints — at a minimum take the drying time, multiply it by 20, then add more!