The first time I heard that term, Do It Yourself, was in relation to hardware stores. There was a big marketing push to get people to fix things themselves. Perhaps it was related to the early 70s recession affecting what was a growing population of new, middle class homeowners. You can't hire someone to add features to the house - but you can "do it yourself." There was, at the time, a big crafts revival as well - a kind of offshoot of a back-to-the-land movement by hippies/boomers. I even had a set of "Do It Yourself" repair books, circa 1969.
DIY went away during the 80s, but re-emerged in the punk underground arts scene. There, DIY related primarily to making music, particularly recording music and releasing your own records without the intervention of a record company.
The band Black Flag, and it's label, SST, operated by Black Flag member Greg Ginn out of his Lynwood home, became the template for DIY. SST Records was a micro-label that didn't work with large-scale distributors. Black Flag booked their own tours, and went to any small city that would host them.
DIY was heavily imbued with "politics", though the politics were not that clear-cut to most. "Black Flag" was an explicit reference to anarchism -- but anarchism is a philosophy that mates opposition to capitalism with valorization of peasantry and opposition to large scale industrial production. (That's partly why anarchists fought alongside communists during the Russian Revolution... but found themselves at odds with Communist rule when farms were being nationalized.)
In the contemporary American context, DIY became more of a turning away from large-scale production to participate in small scale production. The politics of DIY became less about destorying capitalism, and more about taking a long-term vacation from mass produced culture, and "alienated work" (to use some Marxian lingo), by participating in all phases of production, and then selling the final product to a subcultural community. It was very middle class in its aspirations.
Punk DIY fed into DIY zine culture in the early 90s, which was a related but different development. That was a self-publishing movement enabled by the declining cost of small scale printing and desktop publishing. The originators of this medium were newsletters and science fiction and music fanzines.
The DIY spirit was in everything - art showings in warehouses, bind your own books, write your own books and publish them, operate a record company from your bedroom, have a poetry reading even if you lack writing or recitation skills, make your own screen printed t-shirts, and on and on. It was an explosion of amateurism.
Some time between 1990 and 2010, DIY stopped being "underground", and became a fashion style sold at Urban Outfitters. The underground stopped being underground too; the CMJ conference became South by Southwest, which became SXSW. The "default design" became mainstream. Generation X finally got some jobs that weren't totally shitty... but they're still shittier than Boomer jobs.
The common thread between that DIY and today's DIY is about using the available technology (Xeroxing, lower cost recording, improvised performance spaces) to create a community of small scale producers, and small scale consumption.
The "dream" of DIY, in the United States, is the dream of escaping the structure of modern business, to run a "small business". This kind of "small business" is a fantasy sold at Office Depot and Staples; it's very popular with middle class people.