Imagine what happens if you are a developer working on a new GC? Or, a HotSpot developer (not a GC developer) working on modifying the existing GC code? Prior to JEP 304 or Java 10, you will have had a tough life because the GC code was scattered all over the HotSpot source code.
The objective of JDK Enhancement Proposals (JEP) 304 is to improve the source code isolation of GCs by introducing a GC interface. This offers a number of benefits.