Technically, the recording and movie industry do not generate their income through advertising, so how does advertising work for them?

In a way they do generate their income that way. By advertising, there are usually two benefactors: the product being advertised and the sponsor of the advertisement.

The sponsor is given credit for the advertisement in hopes that people will buy THEIR product, and often they do.
The recording or movie industry is putting their product out there, so it is likely to be bought by consumers as well.

Without advertisements, a product would never be seen and therefore never purchased by consumers.