When Swarm creates a default datasource (see DatasourceAndDriverCustomizer.customizeDefaultDatasource), it doesn't get set as the default datasource in the EE subsystem. This is the primary place where WildFly goes to for the default datasource.
Since databases are most often accessed via JPA, this issue isn't visible much, because the JPA fraction takes that default datasource and sets it as a default for the JPA subsystem. This means that JPA works with the default datasource just fine, but other parts of the application server don't (e.g. injecting @Resource DataSource into a servlet).
The correct solution IMHO is set the default datasource in the EE subsystem and avoid setting it in the JPA subsystem, because the JPA subsystem then goes to the EE subsystem.