Most laws in the USA are State laws
This is something that many who have not lived in the USA fail to understand. This is the way it was originally set up and continues to this day.
To see the effect on right to repair, Colorado is not imposing their will on any other state, because they cannot. The kicker is that in most states a company that wishes to do business there has to have a registered office within the state [1], regardless of the State of incorporation and that means the business within that state must comply with all state laws that pertain to the business.
This does, admittedly, lead to a hodge-podge of varying regulations but it does have an effect.
So if a manufacturer of something (farm equipment for example) wants to have their own company branded sales and service operation within the state then they must comply with the right to repair laws within that state. In most cases, as noted above, that requires a registered office within the state. A business that refuses to comply with the rules will have that registered office closed.
Such manufacturers are perfectly free to not do business in that state, of course, but then they lose sales and service revenue.
What the state by state approach does is to impose the will of the local legislature (which is arguably closer to ordinary people) to business that operates within the state.
Messy? Yes. Effective? Yes.
As a rather larger example of one area passing regulations that affect places far beyond, take the RoHS directive (often known as the lead free directive) within the EU. Device manufacturers now almost universally provide lead free components [2] even within the USA despite there being no such USA legislation.
Note 1. Most registered offices are a local attorney's address.
Note 2. There are some exceptions, mostly military and aerospace,