Why do we need a directory named java here?
To allow for other languages.
Do we have another programming language within a java project?
Potentially yes. Systems with components written in multiple languages are common. There is no insurmountable technical reason why Maven should / could not also build the non-Java components, especially when the languages can be compiled to bytecodes.
By specifying a location for Java source code, the Maven designers have (at least) avoided future problems.
UPDATE
Indeed, this is not hypothetical:
Another use-case is for the input files for generators / translators such as idlj and javacc.