The stock gearing on a new bike is likely to have been determined by choosing a compromised ratio based on what worked best for test riders in “average” conditions. As soon as the bike is taken out of average conditions by engine modifications, changes in terrain or by the riding style of a new owner the stock gearing combination may no longer be the best setup. A different front & rear sprocket might be what you need to allow the bike to perform at its best on the type of trails you ride.
Setting up the gearing of any ATV or motorcycle is a trade-off between acceleration and top speed.
Gearing a bike up to produce higher top speed with less acceleration is done using a larger countershaft (gearbox) sprocket or a smaller rear sprocket.
Gearing a bike down giving it more acceleration with lower top speed is done using a smaller countershaft (gearbox) sprocket or a larger rear sprocket.
Changing one tooth on the gearbox sprocket has a significantly larger effect on the gearing than changing one tooth on the rear sprocket. To make a small change in gearing it is therefore necessary to change the rear sprocket size by one tooth, as changing the gearbox sprocket makes a far larger difference in gearing.
So for major changes in acceleration or top speed, change both sprockets. For a big adjustment, just replace the front sprocket. For modest changes, replace the rear sprocket only.