This is being caused by using the smart dimension tool. The tool analyzes the selected geometry and decides how to procede. There are two situations to consider when two lines have been selected: the lines are either parallel or they are not. In the case of the lines being parallel the tool will try to place a linear dimension and when they are not parallel the tool will try to place an angular dimension.
In the case you have outlined the two lines are parallel and therefore the tool is trying to place a linear dimension. But, because they share an endpoint it cannot legally place a dimension that would dictate there be a distance between them.
In the case of the two lines that were not parallel, the tool is trying to place an angular dimension which is legal.
I hope this clears up why you are getting an error.
Thank you, Matt! This is really helpful information for my problem.