Recursive queries.
Some Databases (MySQL) do not have the ability for Recursive Queries, or Hierarchical Data. So sometimes your dataset can only be generated by intelligently compiling data in Java first, and providing a bean instead.
Hibernate
Similar to above, it may be easier to provide a Bean of Hibernate generated objects instead of creating a query from scratch. This also absolves you from generating SQL queries for the different databases your application may support.
Speed / No Database
Sometimes the data you need to generate is not in the database (yet). Or you have no database at all, and you need to generate a report as well. Beans help here too.