I think you have diagnosed the root of your problem when you wrote, in a comment, "I feel I have never really understood [the real numbers]."
I gather you have looked at formal treatments (e.g., Dedekind cuts), but still don't feel comfortable with $\mathbb{R}$.
A few remarks that may help.
First, the apocryphal quote from the famous mathematician von Neuman: "Young man, in mathematics you don't understand things. You just get used to them."
Next, the "official" answer to your question: the cardinality of a subset of $\mathbb{R}$ and its measure (if it is measurable) are two different things. In particular, we can have $m(A)\neq m(B)$ although $\#A=\#B$. That's just how it is.
Next, your image of $A$ and $B$ as rows of dots, where "counting the dots" should tell you something about the measures (lengths) of $A$ and $B$. Before the modern understanding of the real line was developed, some mathematicians did think in these terms, and were puzzled with paradoxes like the one you mention. (See "the method of indivisibles", aka Cavalieri's principle, mid 1600's; to quote Wikipedia, "Today Cavalieri's principle is seen as an early step towards integral calculus,").
But we could ask, if each dot has size zero, why doesn't a line segment made of dots have length (size) zero? One's image is of a finite number of dots, each with nonzero size. I can't truly visualize a point as having length zero.
In addition, given any two real numbers, there are an infinite number of real numbers between them, so there's no such thing as placing them "next to each other".
In short, we have to let go of this crude picture in order to understand, or at least get used to, the modern understanding of $\mathbb{R}$.
You mention studying measure theory. The standard notion used in modern mathematics is the Lebesgue measure. However, on the real line, Lebesgue measure essentially starts by defining the length of an interval $[a,b]$ to be $b-a$.
In mathematics, visualization makes a good friend but a bad master.