you haven't done anything wrong. There are two different ways OSM data is extracted. If you define a bounding box or bounding polygon, you probably expect that the data inside this area is complete. However, there are also ways (edges) that cross this boundary. These ways reference nodes that lie inside and nodes that lie outside this boundary. Some tools also include these nodes that lie outside this boundary. Other tools don't care about nodes outside this boundary. So does osmosis. If you want to make sure that all needed data is extracted, you have to use a buffer zone.