I'd challenge the assertion that Data was specifically designed to be human-like, in regard to human emotions. His older 'brother,' Lore, was designed to possess human-like emotions, but that didn't go as planned, as he turned out to be a bit of a sociopath.
Data was created, and designed to be without emotion, as a direct response to this failure. Soong eventually created an emotion chip for Data, having presumably overcome whatever design flaws were present in Lore, but that wasn't until some time later.
LORE: You did what you had to do? What kind of answer is that?
SOONG: The only one I can give you. You were not functioning properly.
DATA: Lore told me the colonists envied him because you made him so completely human.
SOONG: I wouldn't exactly have used the word envious, Data.
LORE: You disassembled me. You took me apart.
DATA: Lore also told me the colonists petitioned you to replace him with a less perfect android.
SOONG: The last thing you should think of yourself as, Data, is less perfect. The two of you are virtually identical, except for a bit of programming.
DATA: It was a lie. Another lie.
LORE: I would have proven myself worth to you, if you'd just given me a chance. But it was easier just to turn your back and build your precious Data.
SOONG: You were the first. You meant as much to me as Data ever did, but you were unstable. The colonists were not envious of you, they were afraid of you. You were unstable.
DATA: I am not less perfect than Lore.
LORE: Why didn't you just fix me? It was within your power to fix me.
SOONG: It wasn't as easy as that. The next, the next logical step was to construct Data. Afterward, I planned to get back to you, to fix you.
LORE: Next logical step.
DATA: I am not less perfect than Lore.
LORE: I am not less perfect than Lore.
SOONG: Enough! Both of you, sit down. Sit down. For all these years I've been plagued by what went wrong. With all of your complexities, Lore, your nuances, basic emotions seemed almost simple by comparison. But the emotion turned, and twisted, became entangled with ambition. Lore, if I had known you were no longer sitting in pieces on some distant shelf, if I had known that I could simply press a button and bring you here, I would have spent those years trying to make things right for you as well. But all I knew of was Data. So I worked long and hard, and now I believe I've succeeded. This is why I brought you here, Data. Basic emotions. Simple feelings, Data. Your feelings. I've imagined how hard it's been for you, living amongst beings so moved by emotion.
Star Trek: The Next Generation: "Brothers"
As for The Doctor, it's worth remembering that although he started out as a standard EMH Mark I, he grew well beyond his original programming as a result of being left running for far longer periods of time than he was designed to be.
ZIMMERMAN: This isn't good. The EMH has a level 4 memory fragmentation. How long has the programme been active?
EMH: I have been active for, for
TORRES: Almost two years.
ZIMMERMAN: Two years? Well there's your problem. This programme was developed as a short term supplement to your medical staff, fifteen hundred hours tops.
Star Trek: Voyager: "The Swarm"
Encouragement from Kes played a key role in The Doctor's personal growth, and this led to his personality subroutine taking up more space in the ship's computer memory than it was originally intended to.
ZIMMERMAN: Please don't talk. Stay fixed on the fractal patterns while I analyse your data path integrity. Hmm. Hmm? Oh, well there it is.
EMH: What? What is it?
ZIMMERMAN: I told you not to talk! This is the problem all right. The personality sub-routine has grown to more than 15,000 gigaquads. That's the source of the degradation. Look at all this useless information floating around your buffer! Friendships with the crew, relationships with women? Do they find you attractive?
Star Trek: Voyager: "The Swarm"
Although the creator of the EMH Mark I, Lewis Zimmerman, did base its appearance and personality on his own, it wasn't designed to be truly sentient, or as idiosyncratic as The Doctor ended up becoming.
(Note that the 'Zimmerman' speaking in the quotes above and below was not the real Lewis Zimmerman, but a holographic simulation of him, with the same holographic matrix as the EMH Mark I.)
ZIMMERMAN: Ah, just the person I need. Perhaps you can tell me who's been feeding all this useless information into its database.
KES: What do you mean?
ZIMMERMAN: I'll give you an example. Ah, here's something in its personality sub-routine.
EMH: O soave fanciulla, O
KES: He's been studying opera. What's wrong with that?
ZIMMERMAN: It wasn't programmed to be a tenor, it was programmed to be a physician!
KES: What's wrong with wanting to be more than that?
ZIMMERMAN: It's superfluous! Look at me, I've got the same matrix, the same holo-array, the same neural pathways as it does. You don't see me cluttering up my circuits with irrelevancies. I'm content to be the best possible diagnostic programme I can be. Your EMH should be happy to be a fine physician.
KES: The Doctor has taken it upon himself to become a person who grows and learns and feels. It's made him a better physician.
EMH: An EMH programme can't feel anything. It's emotional reactions are simply a series of algorithms designed to make it easier to interact with.
KES: Oh he's much more than that, and I've known him for most of my life. He's one of my closest friends.
Star Trek: Voyager: "The Swarm"
The Doctor's personal growth was such that Janeway, who initially regarded him as just a program and not a person, eventually changed her mind about that, and even advocated that he deserved the same legal rights as a human being.
JANEWAY: I'd made myself clear. But the Doctor disobeyed my direct orders. In the process, he endangered the ship and crew.
ARBITRATOR: That's hardly commendable behaviour.
JANEWAY: No, it wasn't. But it was human. Starfleet had programmed him to follow orders. The fact that he was capable of doing otherwise proves that he can think for himself. Your Honour, centuries ago in most places on Earth, only landowners of a particular gender and race had any rights at all. Over time, those rights were extended to all humans, and later, as we explored the galaxy, to thousands of other sentient species. Our definition of what constitutes a person has continued to evolve. Now we're asking that you expand that definition once more, to include our Doctor. When I met him seven years ago, I would never have believed that an EMH could become a valued member of my crew, and my friend. The Doctor is a person as real as any flesh and blood I have ever known. If you believe the testimony you've heard here, it's only fair to conclude that he has the same rights as any of us.
Star Trek: Voyager: "Author, Author"