Because the underlying entityreference field is hidden, the #ajax handler is not functional. (For instance, I have a form where I'd like to change select options based on the selected entities. This is not possible currently using Form API.)