Form api AJAX, reload js in #attached 3 times
The log console prints 3 times: "aaaa" after the ajax action is over


That's correct, behaviours are re-attached after AJAX requests. That's actually the point of them - to ensure that Drupal modules can respond to changes in the DOM.

If you want to limit the effect of that, core provides once(). You'll need to add the once library separately, after which you can use, for example:

$(context)
  .find('input.myCustomBehavior')
  .once('myCustomBehavior')
  .addClass('processed');


See the JavaScript API overview for more information.

Of course you don't have to use once, if you don't need the complexity it offers you can just keep track of a boolean that determines whether or not your code should execute again.