SQL Server 2016 SP1 CU2 AlwaysOn AG Secondary always disconnected
CREATE AVAILABILITY GROUP [AG_SQL]
FOR 
--DATABASE SetupAG


If this is what you're using (copied from your question) then I would expect it to say disconnected. You've created an empty availability group (no databases, or database only on the primary) so there is nothing to send or receive other than some metadata about the AG.

The fact that it works when you choose automatic seeding means you're adding a database into the AG, it's now no longer empty and should show connected (if it truly is connected).


  On the secondary dm_hadr_database_replica_states is empty and the database doesn't show up in sys.databases. When I look in SSMS the database is shown in 'Availability Databases'


This is because there is no database on the secondary server, which completely falls inline with what you've posted. The "database" shows up under the Availability Groups folder on the secondary because that's the metadata of the Availability Group, not because the database is on the secondary.

The reason it "works" with automatic seeding is because automatic seeding creates the database and seeds it on the secondary for you versus what you're doing now which is creating the AG but not preparing the database on the secondary. Thus, no database on secondary.


  Is this a bug in SQL Server 2016 SP1 Standard CU2 or is there something wrong with my T-SQL statement?


Neither, it's a process issue where the secondary wasn't prepared properly.