When a direct flight is not really a direct flight?

I was recently at Barcelona airport and something caught my attention: in all airport screens, and also in the airport guide, I could see announced some flights operated by Iberia to destinations in North and South America (New York, Bogota, Mexico...), nothing unusual if I did not know that Iberia does not currently operate long distance flights at Barcelona (it is opening BCN-GRU and BCN-MIA in March). Passengers on these flights need to change planes at Madrid, however, nothing in the flight information suggested that was a non-direct flight.

Many airlines do code-sharing on certain routes, so you might end up flying with a different company to that you have booked the flight with, but I haven't come across (yet) a case where an airline markets a non-direct route, involving a stopover an a plane change, as a direct flight (if you do, please let me know!).

For example, in this snapshot from Aena's website (Spain's airport operator) you can find a Barcelona-New York (JFK) flight operated by Iberia, however when looking into the details this happens to be a non-direct flight.

It turns out that Iberia has been marketing for years something called "Catalunya-America": these are, basically, some flights specially timed to provide connections, via Madrid, to some American destinations. The way these flights are marketed has sometimes led people to believe those were really direct flights and it has been a source of misunderstandings.

From what I have seen so far on this case, I found the information provided by Iberia on these flights to be a bit misleading to the uninformed passenger. Despite the fact that they might be well coordinated to enable connections, these are still non-direct flights and this should be made more clear when marketing them.

What I am wondering is why Iberia can present these non-direct flights with their own codes as proper direct flight. What prevents Lufthansa, for example, from showing a Barcelona-Beijing or Barcelona-Bangkok flight, that would in all cases involve a Frankfurt or Munich stopover, as direct flights?

If someone could clarify these points I would be grateful...