Why is my curve bevel doing something weird instead of conforming to the bevel shape?

In the picture, the orange shape is what the bevel is supposed to look like, so the tire fits the wheel. The curve/circle being beveled (black line) goes all the way around the wheel.

I expect the circle to take the shape of the orange bevel object, but instead it just turns into the weird ribbon shape (grey ribbon) you see in the photo? Why? How do I make the black line path into the shape of the orange curve?

That is usually to do with the rotation & position of the bevel object. I’d also check the direction of the curve.