Start here. This is the direct spoken answer to practice first.
Overview
Rollback is convenient cleanup, but a test transaction can change the behavior it is supposed to observe.
A Spring test marked @Transactional usually runs the test method in a transaction and rolls it back afterward. That makes cleanup easy, but unflushed writes may never reach constraints, and lazy associations can remain available because the persistence context stays open. Code can therefore pass in the test and fail when a production transaction commits or closes. I flush and clear when those boundaries are part of the behavior.