As a preliminary question, how is real multiplication defined? Sorry I’m just forgetful about middle school math, but how is multiplication of two real numbers defined? What does it mean by multiplying two real numbers? For integers, $2\times3=2+2+2$, but what is multiplication by a never-ending, never-repeating decimal expansion? How is it calculated? Why should it exist? I’m not talking about university analysis, but everyday math that’s taken for granted.
Now, why is the area of a rectangle equal to the product of two sides, which are real numbers? My guess is to place 1-by-1 tiles inside, then 0.1-by-0.1 tiles, and then 0.01-by-0.01 tiles, and so on, which is like approximating the product by increasing the precision. But is there a more direct understanding using the continuum, which is our intuition?
Here real numbers are the lengths of line segments as well as infinite decimal expansions.
Middle school is typically a ragbag of results not fully linked together. So "decimal representation of a real number" was added with little connection with "basic Euclidean geometry (area, length, angles etc.)". In middle school, we assume the number line $\mathbb{R}$ exists in some form, never even bother defining it.
We start with the area of rectangles given a segment (which we assign unit length). And we rearrange so that $x\times y=1\times z$ becomes $1:x::y:z$ and use constructions such as Euclid's Elements, book IV, Proposition 12 to actually construct the line segment $z$.
Then we have an alternative, defining as decimal representation. This allows you to "write down" an answer, but even addition/subtraction is problematic (there is no guarantee how far back we need to go so the answer is correct at the $n$ decimal place). But we can now write ratio of lengths of segments as decimal expansion, and go back and change half of the definition.
So in short, in middle school, the definition of product of decimal expansions of reals is: you are expected to use number line to get a representation of line segment (modulo the sign), multiply using Euclidean geometry, and convert the result back to decimal expansion. Finally we take care of the sign. Most students will just use a good enough rational approximation, multiply the two rational numbers, and round the answer to whatever precision the question asked for.