I worked for two ad-tech companies and they both taught me more about the craft of software development then any school or the previous 13 years of me working in corporations did.
As long as the company you are working for is not doing anything illegal or fudging the numbers, I don't think you need to justify anything.
Embrace the job, learn everything you can, and then you will be shocked how valuable you have become. Remember - you are trading your time for a paycheck. It is upto you to make sure that time is well spent and that it benefits you as much as the company you work for.
Each one started as scratching an itch. I built my first web stats service back in the time before Google Analytics, when anything more complicated than a basic Apache log analyzer cost money I didn't have. The information tracked (referring URLs, pages viewed, time on site, bounce rate, language of each visitor, etc) is information that's been transmitted and logged since the very first web servers. That's now a freemium service with a couple tens of thousands of users, called W3Counter.
7 or 8 years ago a relative of mine opened a B&M store with a companion online store, and I built several products to help him run that, including a new web stats service that included ad and conversion tracking to show which ads (Google AdWords, Bing Ads, Facebook, etc) were generating which sales. That's now a premium service with a couple thousand users and marketing agencies, called Improvely.
None of this involves tracking people around the web or combining information from multiple websites using third party cookies. Just providing website owners with information about what happens on their own website. But both of my products are commonly included in those "ad-tech landscape" infographics with the thousands of companies on them every year.
Am I supposed to feel bad about that and need to rationalize it? Because I've never felt that way. Keeping track of which pages of your site are most popular, which ads are generating sales, which other sites are linking to yours and sending you traffic, seem as simultaneously essential and innocuous to me as the information B&M stores have when they track how many people walk in the door, what products are selling fastest, which circulars are bringing them sales by tracking coupons, which customers are their repeat customers and what they buy, etc. Their "tracking cookie" is simply your credit card or the grocery store loyalty card you scan every time you check out.
But when you’re in a position to leave, please do so.