I did a set of Brewdog Punk IPA with the kit they are selling. In the howto they put sugar in the bottle before filling. Is it mandatory to have a good beer ?
They are shooting for a bottle conditioned beer which means the beer ferments a little bit in the bottle, trapping the co2 and carbonating the beer "naturally". I doubt they are putting sugar directly in the bottle, but probably putting the sugar in the beer and then putting it in the bottle. This way the sugar dissolves more evenly and gives a more consistent result.
Most breweries force carbonate their beer with CO2 in a tank, but many use natural means to do this.
Is this mandatory? Only if you are making homebrew and need to put it in a bottle AND you don't have a keg system to force carbonate. This is how many homebrewers start out.
Fermantation and CO2
Long story short, yeast consumes sugar and produces alcohol and CO2. During primary fermentation all the CO2 is released into the air (unless you ferment under pressure which I assume you don't). After fermentation your beer has alcohol but is flat. You need to introduce CO2 to your product somehow. Since CO2 is a product of fermentation, we add a little bit of sugar into bottles to spark secondary fermentation. Because bottles are capped, at some point when the pressure is high enough inside the bottle, CO2 starts dissolving into beer.
Adding sugar can be done in couple different ways. You can measure the amount you want, cook it in a little bit of water, mix with your beer and bottle. You can also add a little bit of sugar into each bottle and then fill with beer. I prefer the second method. You can buy muntons carbonation drops and put one drop in each bottle. You can also buy some small measuring cups designed specifically for adding sugar into bottles.
Having a good beer?
Actually - No! I bottled several batches that had off flavors (smelled funny, weren't clear after cold crash, tasted weird, etc.) and the result was good. Beer was "drinkable" after a month but then got better. If you are brewing an IPA and it tastes funny don't dump it. Bottle it and see what happens. You might have to wait several months and hop aromas are gonna be gone but you can still end up with some solid beer.