I don’t know if this has ever been explored in detail, but when I noticed all the speculation that Law and Doflaming were connected just because of their similar Jolly Rogers, I couldn’t help but think of the similarities between Law and Kuma. Such as their similar fashion sense(spots on hat and pants that look like animal paterns), and the design on Kuma’s jacket is very similar to Law’s Tattoo’s on his hands (not identical, but still pretty close. Not to mention Kuma has bear ears on his hat and is closely related to bears, while Law has Bepo on his crew
Taking this info I came up with several theories on how the two might be connected, which became theories that were more about Laws past. Some more far fetch than others(okay they are all farfetched, but still).
1. The most obvious connection is that Law is somehow related to the Revolutionary Army, and that he worked under Kuma before he became a Shichibukai. This may explain why he saved Luffy. This is the theory I believe in least as we don’t see the design on Kuma’s jacket when he is a revolutionary, and I think that meeting Iva-chan would have more of an effect on him.
2. Law has also been experimented on by Vegapunk like Kuma, and Vegapunk likes to put his own personal touch on his creations by having them wear fur/animal patterns to represent his homeland, while putting his own symbol on both of them that he based on the World Government flag. In this theory Vegapunk would of also made Bepo and Law is either still working for him or Law escaped with Bepo. The two may not know each other personally with this theory.
3. Law may have worked with/was an assistant to Vegapunk who focused more on the human aspect of Vegapunks work. When Law saw Kuma come in for modification he either decided that the guy with the bear ears should wear more spots, or he copied his look off of Kuma. And either the symbol is something Vegapunk came up with like earlier, or both Vegapunk and Law are/were part of a group of scientest and doctors who work under the World Government and that is their symbol. In this theory Law left the group for whatever reason, along with Bepo who he helped create, and the reason his bounty is so high, as well as the rumors that he is incredibly cruel, is similar to what the World Government did to Robin.