The gradient tool uses dithering to reduce the amount of color banding. The closer the colors are to each other, the more intense the dithering becomes and alpha counts as well, so alpha 255 to alpha 0 are maximally far from each other, but alpha 70 and 0 are much closer and get dithered harder.
When you change layer opacity, there is no dithering, and you get the banding instead. Here's a synthetic comparison: top part is a gradient from RGBA 255, 255, 255, 31 to 0, 0, 0, 0, on a black background. The bottom part is a RGBA 255, 255, 255, 255 to 0, 0, 0, 0, with layer opacity set to 31. After merging the layers, the visibility was boosted with the levels tool to bring the 31, 31, 31 to 255, 255, 255.
As you can see, the banding is intense on the bottom one, whereas the top one is very fuzzy but you can't really tell the banding. It's a tradeoff and you kind of just have to choose which is preferable for your use.