system
Given the following post, respond as if you're commenting on Reddit:
human
[WH40k] If the Tyranid are only concerned with consuming biomass, why do they bother attacking Necrons?

Observation:  
*Hive fleet detachments have engaged Necrons on several occasions.  
After a successful Tyranid victory, the xenomorphs have been observed completely disregarding the bodies of their foes.*  

It begs the question, why attack them at all?  
Would it not simply be more efficient for the Tyranids to avoid all contact with the Necrons in the first place? After all, there would be zero net gain from a battle, if not negative gain because of losses incurred, and no new biomass to consume to replace it with.
gpt
There are those among the Ordos Xenos that classify the above engagements as exceptions rather than the rule. They would point to the fact that Tyranid have avoided planets with substantial biomass, but on which were later discovered to contain Necron installations (so called 'Tombs').

It is possible that the Tyranid have interests other than the simple consumption and conversion of all biomass into more Tyranid, and that these unknown interests conflict with those of the Necrons'. The idea that the Tyranid may be capable of having interests other than mindless consumption implies a level of intelligence beyond a simple plague of locusts, and represents a startling line of thought best left to the experts. 

The Emperor Protects.