What is the logic behind OSM ways and highways?

I have noticed that highways in OSM are not minimal in the sense that they stretch from one road crossing to the nearest next crossing. Instead they sometimes stretch past several crossings. See for example https://www.openstreetmap.org/way/43114621 Is there a convention for how to “cut up streets into OSM ways”? My concern is that OSM ways might in some cases be overlapping on parts of roads. Is this possible?

An OSM way describes (a part of) a highway where all given attributes are equal. If one of the attributes changes along the way this is typically the reason to split the OSM way, for example, if the surface or the maxspeed value changes. It is possible to have overlaps but these are very likely mapping errors unless the ways have a different layer attribute.

so it is intended for ways to be non-overlapping?

It is intended for highway ways. Other types of ways often overlap, for example ways describing areas like natural=wood or landuse=residential. It is quite usual that those ways share nodes.

And be extremely careful with merging highway sections where all attributes are equal, exept the different section are yes or not a part of a route relation (bus, bicycle)!

If you then merge the ‘equal’ highway sections you destroy the routing! :smiley:

The OSM data model is optimised for the mapper, not the data consumer.

Data consumers are expected to (and do) cut up OSM ways into junction-to-junction segments for routing purposes.

In the example posted by the OP, the ways connecting to the north & south all share the exact same 7 tags and the same bike route relation, So I see no reason why they should be separate.

It’s exactly as Richard says: the data is for the convenience of mappers. These were mapped at different times by different mappers, probably before good aerial imagery was available and thus requiring physical traversal of the street. Sometimes it’s just that the mapper needed to stop editing: to feed a child, go to work, watch a TV programme etc.

Although these ways could apparently be merged there is absolutely no need to do so. The software techniques for processing OSM data for routing models are now rather advanced and merging the data neither provides an advantage for the mapper (for instance just to merge in the iD editor you need to have all visible & in this area of Berlin that means a lot of data in the browser). nor for the routing developer. More usually merging ways creates problems which the user has not foreseen, so it is usually safest to not do so.

Not just route relations, but any relations. It could be a landuse multipolygon, or anything else, really. So you can merge two ways only if they have
a) Same tagging
b) Are part of the same relations, and as the same “role” within the relation.

This applies not only to highways but to every other type of ways, too.