In physics people use tensor as a shorthand for tensor field.
Tensor fields are spatial functions whose function value at each point is a tensor.
More general mathematical definition of tensor is that tensors are multilinear maps from vector spaces to scalars. That's how TensorFlow and HPTT see these tensors.
Oof, you have to squint very hard to see things that way.
Just because an image is physically a two-dimensional array of pixels doesn't suddenly make it a rank-2 multilinear map, and just because you have N planes of images doesn't mean you suddenly have a rank-3 tensor!
Yes, that's where the rot started.
For ML, it just turns out that they can talk about their objects and the corresponding operations also mathematically as tensors.
Now the part that always bugged me was that, at least in C++, a vector is an array that can change length, which is a very non-vectorial thing to do.