What is the difference in aggregating data in Elasticsearch vs Kibana?

Aggregations can be applied at Elasticsearch and at Kibana . What is the difference in aggregating data at these locations ?

The Kibana UI calls elasticsearch to do aggregations and then visualizes the JSON it returns.