This causes the coverage renderer to to fail if org.geotools.referencing.forceXY is set to false.
In several places, geopackage generates a CRS from a SRID. In some places it explicitly specifies "longitude first" (as it should), but in some places it does not (which means you may get a latitude first if longitude first isn't forced by a sysprop or hint)
If you look at this and the following lines: https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/lite/gridcoverage2d/GridCoverageReaderHelper.java#L466
You can see there is the assumption there that reader.getCoordinateReferenceSystem() returns the same CRS as the CRS of coverageEnvelope. But this is not the same for geopackage, if org.geotools.referencing.forceXY is set to false (the latter having incorrectly lattitude first). This causes an exception when attempting to intersect the two envelopes.