My diet is healthy, but I am wondering just for the heck of it if a person with an unhealthy diet that lifts weights can still make gains in muscle mass or not. That is my question. Thank you.
Healthy is a fuzzy term. It probably doesn't matter much if you eat trans fats, big macs and protein bars or salads, quinoa and turkey, assuming that the macro nutrient amounts are equal.
What does matter is the amount of protein. Also, eating healthy, if it really is healthy, will make you live better and longer.
You most certainly CAN build muscle on a sub-optimal diet. One way to think about this : there are two men , with virtually identical physiques. One decides to eat a very high protein diet , but does no training. The other sticks to his "average" diet , makes no changes at all to his eating patterns , but does an intense full-body weights workout , 2-3 times a week. After a year , who will have the better developed physique ? Bet the house on the second man.