Why overlines do not count on Gomoku?
Because the goal of the game is to place exactly 5 stones in a row. Having it limited to exactly 5 pieces means there is more strategy involved in also making sure you don't make a chain to long.
https://mathworld.wolfram.com/Gomoku.html

In standard gomoku, rows of exactly five piece are required for a win, so if a row longer than five pieces (called an overline) is created, it does not count as a win. In free-style gomoku, overlines also count as wins.