I agree with you and the other answers that this is a mess.
However, I'd like to tackle the actual question:
Can the patent and paper have different authors (assume they include the same content)?
Yes. Being inventor is not the same as being author. The intellectual contributions needed for a scientific paper are not necessarily the same as the intellectual contributions of the invention. You may have inventors who did not contribute sufficiently to warrant co-authorship and you may have authors who did not contribute sufficiently to warrant co-inventorship.
Both authorship and inventorship can only be determined by closely examining the actual contributions of everyone involved.
Inventorship is about sufficient contributions to the solution as claimed in the patent.
Important differences include:
for a scientific paper identifying and describing the problem is an intellectual contribution, but for the invention only contributions to finding the solution count.
If someone comes up with a formulation of the problem that makes the solution obvious (which it wasn't before), I guess it would be a contribution to the solution. If it's more like "hey, we have a problem here", rather not.
for a scientific paper, devising experiments to characterize the performance of the invented device or process is a proper intellectual contribution (assuming it's not routine work), but it is not a contribution to that invention.
Why is it like that? Is this the company policy or the patent law? I thought paper and patent are different things.
We obviously cannot say anything about a company policy we don't know. Plus legislations differ. So the following is about what I know about the related legal questions in germany.
However, it is quite possible that people contribute intellectually so as to properly become co-author to the paper without being co-inventors for the patent.
Example 1: I invents a new measurement device and does some basic experiments demonstrating that it works. I files the patent as sole inventor. For the paper, I teams up with a validation expert V who develops a rigorous experiment to measure the actually achieved performance of the new device, and this is published with co-authors I and V.
Example 2: imagine you are in the life sciences studying a particular biological phenomenon in a team: a biologist B who is expert on the biological question and the biology side of the experiments, a physicist P who is specialist for the measurement technique, and a statistician S who contributes expertise on experimental design and does the data analysis.
P invents an improvement to the measurement technique without substantial help from B or S.
=> P is inventor on the patent, the paper describing both the biological question and the invention is co-authored by B, P, and S.
Of course, there may be separate papers about the biological question and the invention, citing each other for the respective details. Then, P would be single author on the invention paper, and B and S would be co-authors of the biology paper (possibly P also, depending on how much intellectual contribution is left after the invention is "cut out")
And of course, B or S may have contributed substantially to the invention and would accordingly be inventors as well.
Now, as part of their new instrument development, P may have consulted engineer E whose work contributed to the invention. Then, P and E would be co-inventors for the patent, while E's contribution to the paper may only be sufficient for an acknowledgement.
I am working for a company as an intern
This puts a big question mark to who actually owns the IP here, so I'd advise you to get proper legal consulting also on this.
Over here, an internship is not necessarily an employment. In particular not if the internship is prescribed by your university curriculum for Bachelor or Master studies. In that case it would be quite likely that the IP you produced is owned by you and neither by the company nor the university, and there'd be particular legal restrictions about contracts for handing over that IP to the company or university (due to the power imbalance).
Another, entirely new level of mess would be added if you were both employee of the university and employee of the company since the legal defaults in employment contracts over here create a legal conflict - which however, is not yours but between university and company (and which is typically solved as part of cooperation contracts for joint projects)
(To add to the mess, the legal procedure on claiming an invention is somewhat different for companies vs. [public] universities.)
Whom to consult?
There are patent information centers (about 20 throughout Germany) who offer initial consulting for inventors. They are neutral as in being neither part of the university IP management (who may be party here), nor part of the company.
Chambers of commerce and (university) business incubators offer initial consulting for people who think about starting a business, and often also initial consulting for inventors.
At least the university incubator services are likely used to the very first crucial question of starting a spin-off based on some invention being whether the effort to legally disentangle the situation is worth while or whether the potential business is buried at this point;-)
If they are not able to answer your questions, they will at least be able to point you to someone who is.
The university IP office likely offers consulting as well, but they may be an interested party.
However, if you do not have any personal commercial interest in the patent, that is unlikely to negatively affect you.
Personal experience: I've invented something where the patent information center people said it's likely patentable, but the legal situation with my public research institute (even without company involvement) was so entangled that I decided it was not worth while to follow up the matter.
However, when people talk about inventions vanishing in drawers, I have a story to contribute now ;-)
Further advise
From what you write I think the best way for you is to treat this as an opportunity to learn, but not expect any additional outcomes.
- Determine authorship the way it is always done.
- Try to find out (via consulting above)
- whether your friend should actually be co-inventor. If so, list them.
- whether you have any obligations towards your university wrt. the invention.
It may be that the practical solution to this mess is to have only the paper but not the patent: for the company, while this means they cannot keep anyone else from using this solution, it already gives them the legal certainty that also noone else can file a patent on this (forbidding them to use the invention) in the future.