Computationally and memory efficient algorithm for a relatively simple problem
I don't know what algorithm they use so I don't know whether this will be better, but there is an efficient algorithm for your problem, by using a tree.  Form the list of all endpoints of all ranges and bins, and sort it.  This partitions the real line into non-overlapping intervals, where each bin is a union of intervals that don't overlap.
Put those endpoints into a binary search tree.  Each internal node in the binary tree represents a union of those intervals.  You can store, in each tree, the min, max, sum, and sum of squares of all values in that interval, filling these in bottom-up.  Note that given these statistics for the two children of a node, it is easy to compute these statistics for the node itself in $O(1)$ time.
This yields an $O(n \log n)$ time algorithm, where $n$ counts the number of ranges + number of bins. It takes $O(n \log n)$ time to sort the endpoints, then $O(n)$ time to build the binary search tree, then $O(n)$ time to fill in each node bottom-up.
You might also enjoy reading about interval trees and segment trees, if you do a lot of computation on ranges/intervals.