I mean it's a pretty basic concept to consider. If it has ecchi in it or is an ecchi anime, then yes.. it was made for the reason of essentially being a teasing hentai "with a story" that's produced as an anime. And pretty much does so on purpose and unapologetically.
If it's an anime that has practically no story to be seen anywhere, next to no or very bad humour or action for that matter, and just has a crapton of fanservice that's supposed to be 'funny' then yea it's basically hentai "masked" as anime just to get ratings.
An example of this would be Sin: nanatsu no taizai. I actually somehow managed to watch this all the way through, and while it does have a story.. it is blatantly intended for full fanservice and ecchi. Like that is clearly it's purpose for being made. And honestly that's not a big deal, if it was called a hentai then it'd be a hentai. If it's an anime that essentially has the same purpose, then who honestly cares? it's still the viewers choice to watch it, for whatever reason, or not.
Sometimes the fanservice is a bit silly and over the top/unnecessary, but really only sjws and weiners who are uncomfortable about sex care about that kind of thing. Like honestly (TL;DR) who gives af