Q:

Can someone tell why this flag was declined?

This answer is just worthless. Why was the flag declined?

A:

The post you linked to had 11 flags on it: 7 not an answer, 2 spam, 1 very low quality, and an auto-flag for very low quality. All those flags were marked helpful.
You are probably thinking of a "spam" flag you raised on a different post a few hours before. I handled that one and declined it. It was an older answer (from 2013) which was very low quality and had two delete votes cast on it. I deleted the post but declined your spam flag because "spam" is not the appropriate flagging reason for answers which are simply very low quality.
Moderators are generally advised to mark flags has helpful if they lead the moderator to taking action, even if the flag reason is incorrect. However, the spam flag has a specific meaning and use:

What makes something spam and when should I flag it?
A post should be marked as spam ONLY when it contains an
unsolicited
advertisement.
It should NOT be marked as spam when:

The answer contains no useful information, such as an answer that
says “I don't care about your problem”. Flag an answer as not an
answer instead; if you find a weird non-question, then flag it for
moderator attention with a custom explanation.

It contains only gibberish, such as “fsdguejgkfdlk”. Use the rude
or abusive flag for these
cases, or flag for
moderator attention with a custom explanation if it requires more
detail.

...
How does the spam flag differ from the rude or abusive flag?
In terms of getting the post deleted, there is no functional
difference aside from separate counts – 3/6 of either will be
sufficient to hide/delete. However, spam flags provide data for
spam-filtering, while
rude or abusive flags provide data for anti-trolling measures instead.
What effects do these flags have on a post?
These types of flags receive an extremely high priority in the
moderation queue. It should be used only when the content of the post
you are flagging meets the criteria defined above, or it will likely
be declined.
The spam flag is designed to eliminate posts with no relevant content
and to penalize the authors:

3 flags on a question (spam or rude or abusive): question is
banished from the front page and all question lists except search
results.
6 flags (spam or rude or abusive): post is
locked, deleted, and the
author loses 100 reputation.
1 flag from a moderator has the same
effect as 6 flags from normal users: instant destruction.
Contents of an answer that was deleted, and got at least one valid
spam or rude or abusive flag, will be hidden.
Because a
question with 6 flags is locked and deleted by the Community user, a
10 k reputation user cannot undelete it.
Each flag carries an
implicit downvote for calculating the post’s score; it does not affect
the caster’s reputation, however.

What are the “spam” and “rude or abusive” (offensive) flags, and how do they work?

I declined your spam flag since such flags are used for data-filtering and apply an additional penalty of 100 reputation on the post author, neither of which would have been appropriate. If you hunt around on main meta you'll see cases where moderators have declined a spam flag yet deleted a very low quality post (see, e.g. this post by a Stack Overflow moderator).
The correct flag reason would have been "very low quality" or "not an answer". I would have marked such a flag helpful.
I can't speak for the moderator who marked your spam flag on the linked answer as helpful, but it may have been marked helpful only because there were so many other flags on the post and it did need to be deleted.
Please take care to flag for the appropriate reason.
Also, your comment

@Valorum , please delete this answer.

on the linked post was both unnecessary and inappropriate. It was unnecessary since flagging the post had already brought it to the attention of the moderators via the moderator queue, and it was inappropriate since @Valorum is no longer one of the site moderators.

