Pretty much almost all frameworks I use in programming uses the height and width when identifying a flat dimension (without Z axis), but when in math, a 2 axis object is always measured by length and width. What is the history behind this naming convention?
I guess the majority of frameworks used in programming today (and maybe every framework you tried) use the terms "height" and "width" for positioning of images or shapes on a computer display. And as @whatisname already mentioned in a comment, computer displays are often mounted vertically, so these terms fit well.
The 99% use case for these frameworks are graphical user interfaces. Pure mathematical use cases are relatively rare today, and frameworks which are designed for mathematical 2D or 3D applications use typically X,Y (or X,Y,Z) for the axes.
Due to my personal education, I think "width" and "height" map quite unambigously to the maximum range of "X" and "Y" in a 2D system, whilst without a separate documentation, I would be unsure how to map "width, length" to "X, Y", it could be "Y,X" as well. But YMMV.
The history is that things like paper are labeled with height and width, so programmers use those labels.
Length usually refers to a shape's size along its greatest ("longest") axis, that is, in its own coordinate system.
Height usually refers to a shape's size along the vertical axis of the "world" coordinate system.
Width is ambiguous.
Perhaps because height is strictly a spatial dimension, but length could refer to something else. Length is already commonly used do describe the size of an array, and "How long should I wait" uses length to refer to time.