Yes, it is important for people in tech. Not mandatory, but helpful getting jobs, if you want to get jobs.
As a tech manager, most of my recruiting and initial interaction with candidates happens on LinkedIn. Keep in mind that the other major options for someone in my role are:
Open call for candidates from the Internet, which gets you 99 useless applications for every 1 useful one, which is super slow and wasteful
Pay recruiters 30% of a year of salary to vet candidates for you, which is super expensive
Therefore my startup and others like it use a "seek" model instead of a "sift" model for finding experienced candidates. I end up doing a lot of my recruiting actively on LinkedIn, often from people I know or people they know that I can ask them about. Many techies don't even have a traditional resume any more, just their LinkedIn page, which is fine with me, it's a lot easier to share with others and there's a lot of other tooling which integrates with it (I use Gem, for example, which is like a candidate management tool that works with LI).
There are other sites where you can search job seekers (indeed, etc.) but they are generally worse - just keyword matching on resumes, instead of the kind of cross-referencing, declared interests, posted work, and other stuff possible in LI). So since LI is the predominant ecosystem, it gives best results when trying to hire using a seek model.
Of course if you are not looking for a job right now and are on LI you might get contacted about jobs you don't want. LI provides various tools for blocking actual spammers. As for real jobs - a) should you ever really not be looking? Unless you are working your perfect job for more money than you can stand, it is probably good to be aware of offers. And b) why be resentful about that? It's like someone offering you a sandwich and you saying "no thanks I just ate," then getting angry at people offering you things seems... weird. Making contacts, posting things you've worked on, and so on builds up a virtual 'rep' for you over time which will make it a lot easier to get jobs, and times are not always super fat even in tech.