It was literally just copy pasted from the linked source (the official Oracle docs)
And those docs were likely trying to show you how to use multiple features, not the most basic implementation of it
And those docs were likely trying to show you how to use multiple features, not the most basic implementation of it