On official solidity page , there is an example Safe remote purchase, in that example there is a payable function Purchase, and function firsts checks if msg.value is even or odd. I want to know if that is just for purpose of demonstration or is there any significance of that code.

msg.value can be even/odd. I guess that's only for demonstration. If you need even value in msg.value (like in case where you want to distribute 2 equal parts t2 addresses), you can have a check like that else if you don't need that check, skip this.
– Prashant Prabhakar SinghNov 15 '17 at 9:08

Note that in practice if you need to split ETH into two parts, checking that msg.value is even is somewhat unnecessary. The difference is 1 Wei, which is an incredibly small amount
– Tjaden Hess♦Nov 15 '17 at 16:05

@TjadenHess Yeah obviously that's negligible, but if we have to do it million times, it will matter, so I guess if we can handle the case, we should. :)
– Prashant Prabhakar SinghNov 16 '17 at 4:00

Honestly, even if you do it a million times, were talking about 10^-12 ETH, or around 1 trillionth of a cent
– Tjaden Hess♦Nov 16 '17 at 5:17