Something to remember is that shonen, like shojo, josei and more, are more… market segments, not genres. In practical terms it means things like “male teenagers”, or “people in their 20s” or “middle aged housewives and office ladies”, etc. So while sometimes a market segment is dominated by a genre, from time to time a title of another genre gets popular for that type of people.
The genre distinction is interesting, shonen is “for boys” and shojo is “for girls” but shonen is also very popular with the girls, they also liked Dragon Ball years ago, like now they like Kimetsu no Yaiba. However I doubt the same can be said the other way around, I suspect there isn’t a lot of 15 year old boys reading shojo.
On the other hand as you ‘advance’ in age, there are less distinction in genre’s audience, in seinen while it’s somewhat male oriented (like sometimes war stories, or crime or historical stories are) the distinction is much lesser than in shonen/shojo.
But things are more complicated than that. Works (manga) are technically not shonen or shojo, but the magazines they publish are categorized as such, because that’s what people buy originally, the magazine. So when people say Attack on Titan is shonen, they say it because the manga is published in Bessatsu Shōnen Magazine. And that’s the complicated part where the borders are all very diffuse. Let’s enumerate some reason:
-Some magazines strive in having a clear market identity, being very ‘for girls’ or ‘for boys’. Others are more general, letting more types of stories to be published inside. Some of them specifically where created to avoid such categorization.
-And still more complications: there are something called ‘marketing’ which may… lie or fool people. Like putting ‘shonen’ in your magazine’s title but really not being literally for kids but hey shonen magazines sell more than the rest…
-This isn’t even considering that the work themselves sometimes won’t be easily classified as for one market segment or for another. There are some manga that are very much in the middle of what I traditionally would consider ‘shonen’ and seinen’. Like any classification, it won’t work 100%, it’s just some arbitrary labels and some will be left out.
-Magazines themselves can slowly change over the years. Shonen Jump is the premier shonen magazine, and I have the impression decades ago was more traditional ‘for kids’ magazine, but now they have been opening themselves up to more diverse stories (relatively speaking, of course).
Continuing with Attack on Titan example, on the same magazine other works have been published, like Happiness, The Flowers of Evil, and O Maidens in Your Savage Season. If AoT already isn’t exactly a traditional action shonen, those three are even further away. But still, I have found blockheads on Internet that will refer to them as shonen because it’s published in a shonen magazine. Some people take the classifications very literally.
About seinen, in my experience there are two tiers of them. The ones are properly adult, and the ones that in reality they were very shonen-like, but with more violence and/or sex. Which, you know, imo makes them ‘adult’, in quotes… but I have the feeling the target market is just edgy teenagers.