Currently, the grace period is set to retention time if the grace period is not specified explicitly. The reason for setting the default grace period to retention time was backward compatibility. Topologies that were implemented before the introduction of the grace period, added late arriving records to a window as long as the window existed, i.e., as long as its retention time was not elapsed.
This unintuitive default grace period has already caused confusion among users.
For the next major release, we should consider to set the default grace period to Duration.ZERO. or to make it a mandatory parameter.