The regular expression in the /etc/fail2ban/filter.d/apache-badbots.conf file is broken.
It is:
failregex = ^<HOST> -."(GET|POST).HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$
However it doesn't match, because most bots use a more complex string. The regexp should be:
failregex = ^<HOST> -."(GET|POST).HTTP.".(?:%(badbotscustom)s|%(badbots)s).*"$