Univision is the biggest Hispanic media company in the U.S. Why in the world does it want Gawker Media, the aggressively impudent digital publisher that sold itself in a bankruptcy auction?

First, Univision’s core TV business is suffering a steady erosion of viewers, and the company has been investing in digital businesses to improve its financial profile ahead of an initial public offering expected later in 2016. Gawker brings a robust digital audience — it registered 56 million unique viewers for the month of July across its core group of sites, according to comScore, rebounding from a big fall-off earlier this year — that skews younger than Univision’s traditional base. Gawker also has a well-developed e-commerce business that Univision could leverage across its portfolio.

The other key point: Univision’s winning $135 million bid for Gawker is less than it would have paid if it weren’t for the publisher’s legal headaches. Nick Denton was forced to give up control of his digital media empire, after the company lost its sex-tape fight with Hulk Hogan, in a lawsuit bankrolled by Gawker-hater Peter Thiel. It’s not a done deal, however; a bankruptcy court must still approve the transaction. (Meanwhile, Gawker is appealing the Hogan decision.)

If Univision ends owning Gawker’s media operations, it will get a wounded — but still valuable — vehicle to expand its online advertising reach to millennial audiences. Through July 21, Gawker had revenue of $17.8 million for the year to date, compared with $48.7 million in 2015, according to bankruptcy filings.

Univision declined to make execs available for an interview. But Isaac Lee, the company’s chief news, entertainment and digital officer, has previously outlined the online-growth strategy. As he said when Univision acquired a controlling stake in humor site The Onion in January, which brought some 25 million monthly uniques under its umbrella, “we are expanding our role as a go-to source for digitally connected, diverse audiences.”

One wrinkle: Univision might not keep the namesake Gawker.com, the site that posted clips from the Hogan sex tape in 2012 and has courted controversy with other stories. The broadcaster’s bid for the Gawker Media assets would give it the right to transfer Gawker.com back to the bankrupt entity (which along with Denton is on the hook the $140 million jury award in the Hogan case). According to a post on Gawker, Univision executives “have committed to finding positions for current Gawker.com staffers elsewhere within Univision, including among the other six sites.”

Univision’s other digitally oriented properties include Fusion, which it fully owns after Disney exited the cable and digital news venture earlier this year; The Root, a popular website for African-American news and commentary, from Graham Holdings Co.’s Slate Group; and Flama, an English-language entertainment network. (Disclosure: Univision and Variety are partners in the Variety Latino digital venture.) The roll-up plan is aimed at diversifying the aggregate demo amid the aging and largely Spanish-speaking audience it has served for decades on TV.

The trick for Univision will be to maintain its connection to Latino consumers (and marketers) while building out media properties that don’t fall into that wheelhouse. Gawker Media, whose sites include Gawker.com, Gizmodo, Jezebel, Deadspin, Lifehacker, Kotaku and Jalopnik, doesn’t focus on Hispanics per se, but the millions of eyeballs it delivers could fit nicely into Univision’s overall pitch to advertisers. And more than half of Gawker Media’s audience is under 35, per comScore.

“They’re not looking to turn all these brands into Univision brands — they just need to be able to sell ads against all of this,” said Adriana Waterston, senior VP of insights and strategy at Horowitz Research, which specializes in multicultural media. “They can say, we still super-serve the Hispanic audience, but we’re expanding our reach with different brands.”

Univision’s digital expansion comes amid the departure last month of chief strategy and data officer Kevin Conroy, who left the company after more than seven years to join MGM as president of digital and new platforms. Lee had already assumed oversight of digital in November 2015, while with Conroy’s exit Tonia O’Connor, chief commercial officer and president of content distribution, now oversees the Enterprise Development Unit and data efforts, and CMO Jessica Rodriguez now also oversees research.

It’s not clear how Univision’s variegated digital businesses will gel from an operational standpoint. And it may not be enough to offset the drop from TV, which has put pressure on its earnings (along with $9.3 billion in long-term debt after the 2007 leveraged buy-out led by media mogul Haim Saban). For the first nine month of 2015, it had $2.12 billion in revenue, down 2.8% from the year-earlier period, and a net loss of $15.9 million versus $139.9 million for the first nine months of 2014, according to its January S-1 filing to go public.

“(T)here can be no assurance that we will successfully replace reduced television advertising revenue with revenue from our digital platforms,” the company said in the IPO filing.

For Univision, the Gawker bid underscores its urgency find new avenues of growth as the once-dominant broadcaster sees television audiences shrink. For the 2015-16 season, Univision primetime ratings fell 27% in the 18-49 demo, according to Nielsen.

“They’ve been losing an astounding amount of TV viewership, and that’s why they’ve been going after these multicultural, millennial properties,” Waterston said.