The straight line is a 2D Bezier curve, with two control points. The bevel function gave it some thickness. The circle is a separate 2D object.
Now, when the circle moves, the idea is that that end of the Bezier curve should move with the circle, staying at the circle's center. The other end should remain where it is.
So, somehow that end of the Bezier curve should be "attached" to the center of the circle. I thought using the Hook modifier. But that requires a vertex group to attach to the object. Bezier curves apparently can't have vertex groups (couldn't find it in the property view), so can't use the modifier. Then I considered using the parent function, but apparently a vertex can indeed parent an object, but an object cannot parent a vertex (at least, I couldn't find a way). And anyway, again, Bezier curves don't have vertices. So wouldn't have worked either.