The purpose of this method is to make it easy for devs to automatically convert any numeric value (
BigInts, maybe even
Decimals) to a string representing a binary data size/length/count, and being able to choose any standard system like SI or IEC (and maybe more in the future).
This S.O. question (and its comments) show how hard it is to get the implementation right, and the number of views and upvotes shows how useful such a function would be (yes, I'm aware I may have committed a fallacy).
JS code is often used to deal with files (or just data in general), and many times it is necessary to display statistics about the data in a user-friendly manner