Database Mirroring failover with CNAME
This is by design.  In the situation where your client is able to connect to the primary server but the database has been failed over to the secondary server, the primary server will inform the client of this.  Because the server has no awareness of the CNAME you're using it will use the information it has from the mirroring configuration to direct the client to the current location of the database.

Where your CNAME would come into play would be in a situation where the primary server is no-longer contactable.  The client will then need to time out on contacting the primary before attempting to connect to the secondary server configured in the connection string.  

The following page from MS describes the behavior...
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/database-mirroring-in-sql-server