The short answer is that whatever exam you do will limit the highest category of licence you may (eventually) hold. PPL exams will limit your highest level of licence to a PPL, CPL exams will limit your highest licence to a CPL, ATPL exam for the ATPL ('limit' probably isn't the best term for that last one

).
In some jurisdictions the aviation authority allows a pass in all the exams for a higher licence to substitute for some or all exams some lower licences and ratings. In other countries, the authority requires passes at each level for each licence. For example, Australia will credit PPL exams if you pass the CPL exams but will not credit PPL or CPL exams if you pass the ATPL ones. JAA will credit PPL, CPL and IR if you pass their ATPL exam. For that reason most students training for a professional licence in JAA countries opt to sit the ATPL exams and save themselves money and time whilst avoiding wasted effort.
Bear in mind that in no case do you complete your training at your flying school and walk out with an Airline Transport Pilot Licence. What you will have is a CPL + IR + ATPL theory passes and around 250 hours experience. In JAA regions this is commonly referred to as a 'Frozen ATPL' even though the only thing 'ATPL' about it is the passing of the theory exams. At some point in the future, after accruing at least 1500 hrs including various subtotals and passing some form of test flight, you can then apply for the issue of an ATPL. Until you meet those additional ATPL requirements you are a Commercial Pilot Licence holder and will remain so**.
One reason why someone might opt to sit the CPL exams (+ IR exams if an instrument rating is desired) instead of ATPLs is if he or she has no future intention of ever working in part of the aviation industry that would require an ATPL or ATPL theory passes. That pretty much limits one's career to instructing or air taxi in single pilot aircraft. Doing the ATPL exams, however, gives access to those career options without limiting future options.
**As I've written in other threads, I think the use of the term 'Frozen ATPL' by flying schools is a bit underhanded. I've lost track of the number of people who think that their training culminates in the guaranteed issue of an ATPL and not, as is really the case, a CPL with the future
possibility to upgrade to an ATPL. That rather significant difference isn't exactly emphasised.