The ads showed computers as toys for boys because that was what the market was like and not the other way around.
In the mainframe days most people only met a computers in their college days. Some would become more interested in them than what they were supposed to be studying (physics, biology, whatever - computer science courses were pretty rare back then) and would end up becoming programmers. It was mostly men, but there were a reasonable number of women (a lot more than today in relative terms, fewer in absolute numbers).
The microcomputer revolution happened because a certain kind of guy (as far as I know, no women participated in the Homebrew Computer Club meetings, for example) wanted to have his very own computer even if it was completely useless. Normal computer people looked down on those weirdos, but they soon hit it big. As prices came down it was possible to give a kid a computer as a toy. Practically no girls were interested (and those that were tended to be discouraged by parents and friends) but most boys were also not excited about calculating Fibanacci sequences or typing in Basic listings to draw mazes. It was a rather specialized market and that is what the ads aimed for.
The computers in the 1980s ads simply were not interesting for the general public. This changed in the early 1990s with the home office - a computer with disks and a reasonable printer and compatible with the one you had at work and changed yet again in the late 1990s with the Internet. That brought its own set of problems (which the Raspberry Pi was created to address) without killing the "computers are toys for boys" image that had been created.