Like in all countries, the authorities decide whether you are granted a visa or not, based on the documents they have and their own guidelines. They are not required to provide an explanation and these guidelines might change for different countries of origin.
I can't say if there is any issue with applying so soon to another country.
But in general, it's possible to apply to any Schengen country for a visa, as long as you can justify that this is your main destination.
So, you might not be allowed to enter in Switzerland if you have a German Schengen visa and if you cannot justify that your main destination is Germany at the entry point. It would be easier to enter in Germany and then travel to Switzerland.
To back it up, I know people that apply for example to Spain rather than France, because Spain requires less papers and then had to fly to Spain first before travelling to France.
And of course, there is no guarantee that you will get the german visa.
Edit: Ok, I did some more search. People seem to agree that it's possible to enter any Schengen border with any Schengen visa (which contradicts the personal story). I now attach the link from the FAQ of the Europa website that also covers this matter.
5 Where do I submit my visa application? You must lodge the
application for a Schengen visa at the Consulate of the country that
you intend to visit, or – if you intend to visit more than one
Schengen State, the Consulate of the country of your primary
destination (i.e. main purpose of stay or longest stay). If you intend
to visit several Schengen States and the stays will be of equal
length, you must apply at the Consulate of the country whose external
borders you will cross first when entering the Schengen area. As a
general rule, you must apply for a visa at the Consulate with
territorial competence for the country in which you legally reside.
For more detailed information, please visit this page on our website:
Where and how to apply
6 Can I enter the Schengen area in country X,
while the visa was issued by Schengen country Y? As a general rule you
may cross any Schengen border with visa issued by any Schengen
country. However, the short-stay visa does not automatically entitle
you to enter the Schengen area. See FAQ no 16 on checks at the
13 My visa has been issued by, for example, the
German Consulate. Could I use this visa to make a trip to other
Schengen States? Yes. According to the Schengen rules, the Schengen
visa is generally valid for all the countries in the Schengen area.
Please note, however, that you always have to apply at the consulate
of the country which is your primary destination (see FAQ no 5). The
territorial validity of your visa is indicated on the visa sticker
under the heading "Valid For". You will find information on how to
read your visa sticker on this page of our website: How to
read/understand the visa sticker. See FAQ no 16 on checks at the
16 Do I have to present any other document at the
Schengen external borders apart from my travel document with the
Schengen visa? The short-stay visa does not automatically entitle you
to enter the Schengen area. At border (or during other controls) you
may have to show the visa but also provide additional documentation,
for example information on that you have sufficient means to cover the
stay and the return trip. It is therefore recommended that you carry
with you copies of the documents which you presented when applying for
the visa (e.g. letters of invitation, travel confirmations, other
documents stating the purpose of your stay).
So, in theory, it's advisable to enter at the port where your visa was issued, although it seems like several people have had no issue with that. And from my friends' experience, they didn't try to travel directly to France and were declined, but they travelled to Spain (which issued the visa) so I can't comment on whether they would face a problem or not.