I am travelling to Netherlands and Germany as a tourist. I have invitation letter from a friend in Netherlands. I am applying for a Schengen visa from Netherlands consulate. Should my point of entry and exit be necessarily Netherlands?I plan to enter Netherlands and return back from Germany
The Netherlands should be your main part of your Schengen visit, but it does not need to be your entry point, it does not need to be your exit point and it does not even have to be your longest stay.
It will be easier if your stay in the Netherlands is longer than any other, as that is easier to proof than the main reason to visit.
When you enter the Schengen zone you will be asked your plans.
Explain them as good as you can, and there should be no problem whatever entry point you have. You will have ongoing travel which will get you to the Netherlands, have that ticket or a print of your plans near at hand in case you are asked for them.
Leaving the Schengen zone will not be a problem at all, as long as you are within the time you have been given for your visa.
There are not rules about which country or airport to use for arriving or leaving, as there are plenty of flights where you have a connection between entering the Schengen zone and the country you are going to spend time in.
When you apply for a visa you have to mention travel plans, it is asked that you mostly stay with those plans. But change of Schengen Entry country is not a big change, often it is even out of your hands if your airline re-routes your flight.
The main thing is that your length of stay in your main country or countries will remain about the same.