Both legacy and new sensor accept only strings as attributes. At the same time integrations can but any kind of data to the attributes.
One use case where we need list and list of dict under attribute is following. Some users use NordPool electricity price sensor which has a lot of existing examples how to use it and how to visualize it. However, it only gives a partial energy price where everybody need to add different taxes, duties and additional costs.
There are many different ways to calculate final price. This makes it impossible to create a simple new custom integration for that. Without that it is a lot of work to do all those calculations for every specific use case.
It would be very handy for everyone to just create one matching template sensor for that and later use it instead of NordPool original sensor.