The first line is never going to be the thing that first gets my attention about a book. It'll be the cover or the title or the author or someone talking about it on Twitter/Goodreads. I'm not going to get to the first line until I have a reason to pick up the book.
However, if I'm buying the book, it's rarely without checking out the opening. I don't rely solely on the first line, but I'll read a paragraph, then a page in. If in a bookstore, I'll try to get to the second chapter (if it's holding my interest) before making a decision because I've been burned by many excellent first chapters that don't reflect the rest of the book. If a Kindle sample I'll give it the full sample...or until I'm bored. And that's the thing. If the beginning doesn't interest me, I won't give it all that time. So the opening lines do matter because they make me keep examining the book.
Of course, what interests me might not be what interests someone else. I might put down a book because the POV character bit their lip in the first paragraph, and others might not see that as a grave sin. I might find some poetic language too hard to connect to, but others may love it. I may just hate the character's voice, and that's a matter of opinion. The hardest ones are the ones that I find readable, but don't feel the need to buy right this second. On my Kindle, they stick around in my "Samples" collection for years. The opening matters, but you can't please everyone.
And, yes, obviously it's important that the whole book shines, not just the opening. Because while the author may not have any say in the cover or the title or whether i know their name already, they can make the story that everyone is talking about that was the reason I picked up the book to check out the opening in the first place.