No, you learn things along the way that may go off in different directions and become something else entirely, whether or not it's applicable to the specific project or goal you are working on.It is a fact that it is a waste if you had stopped and just not continued to work on the project until it was successful and viable.
You did, so it's no longer a waste.
Apple didn't, so it is entirely a waste for them.
For instance, a 3M scientist was working on what they hoped was a super-strong adhesive. They had various results and one of them was a total failure as a super strong adhesive. But they took a look at it as a possible low tack, repositionable adhesive. 3M Post-Its are born, a billion dollar + earner, with variations applied to many other products.
Even your failures are important, and not a waste. Researchers know that all information is good information.